Skip to content

Commit

Permalink
Minor script tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jul 21, 2020
1 parent 634fccc commit 6b2ef13
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,24 @@ def load_config():
config.read("platformio.ini")
items = config.items('features')
for key in items:
deps = re.sub(',\\s*', '\n', key[1]).strip().split('\n')
if not key[0].upper() in FEATURE_DEPENDENCIES:
FEATURE_DEPENDENCIES[key[0].upper()] = {
ukey = key[0].upper()
if not ukey in FEATURE_DEPENDENCIES:
FEATURE_DEPENDENCIES[ukey] = {
'lib_deps': []
}
deps = re.sub(',\\s*', '\n', key[1]).strip().split('\n')
for dep in deps:
parts = dep.split('=')
name = parts.pop(0)
rest = '='.join(parts)
if name == 'extra_scripts':
FEATURE_DEPENDENCIES[key[0].upper()]['extra_scripts'] = rest
FEATURE_DEPENDENCIES[ukey]['extra_scripts'] = rest
elif name == 'src_filter':
FEATURE_DEPENDENCIES[key[0].upper()]['src_filter'] = rest
FEATURE_DEPENDENCIES[ukey]['src_filter'] = rest
elif name == 'lib_ignore':
FEATURE_DEPENDENCIES[key[0].upper()]['lib_ignore'] = rest
FEATURE_DEPENDENCIES[ukey]['lib_ignore'] = rest
else:
FEATURE_DEPENDENCIES[key[0].upper()]['lib_deps'] += [dep]
FEATURE_DEPENDENCIES[ukey]['lib_deps'] += [dep]

def get_all_known_libs():
known_libs = []
Expand Down

0 comments on commit 6b2ef13

Please sign in to comment.