|
@@ -96,12 +96,10 @@ def install_features_dependencies():
|
96
|
96
|
del deps_to_add[name]
|
97
|
97
|
|
98
|
98
|
# any left?
|
99
|
|
- if len(deps_to_add) <= 0:
|
100
|
|
- continue
|
101
|
|
-
|
102
|
|
- # add only the missing deps
|
103
|
|
- proj = env.GetProjectConfig()
|
104
|
|
- proj.set("env:" + env["PIOENV"], "lib_deps", deps + list(deps_to_add.values()))
|
|
99
|
+ if len(deps_to_add) > 0:
|
|
100
|
+ # add only the missing deps
|
|
101
|
+ proj = env.GetProjectConfig()
|
|
102
|
+ proj.set("env:" + env["PIOENV"], "lib_deps", deps + list(deps_to_add.values()))
|
105
|
103
|
|
106
|
104
|
if 'extra_scripts' in FEATURE_DEPENDENCIES[feature]:
|
107
|
105
|
print("Executing extra_scripts for %s... " % feature)
|
|
@@ -110,17 +108,16 @@ def install_features_dependencies():
|
110
|
108
|
if 'src_filter' in FEATURE_DEPENDENCIES[feature]:
|
111
|
109
|
print("Adding src_filter for %s... " % feature)
|
112
|
110
|
proj = env.GetProjectConfig()
|
113
|
|
- src_filter = env.GetProjectOption("src_filter")
|
114
|
|
-
|
|
111
|
+ src_filter = ' '.join(env.GetProjectOption("src_filter"))
|
115
|
112
|
# first we need to remove the references to the same folder
|
116
|
113
|
my_srcs = re.findall( r'[+-](<.*?>)', FEATURE_DEPENDENCIES[feature]['src_filter'])
|
117
|
|
- cur_srcs = re.findall( r'[+-](<.*?>)', src_filter[0])
|
|
114
|
+ cur_srcs = re.findall( r'[+-](<.*?>)', src_filter)
|
118
|
115
|
for d in my_srcs:
|
119
|
116
|
if d in cur_srcs:
|
120
|
|
- src_filter[0] = re.sub(r'[+-]' + d, '', src_filter[0])
|
|
117
|
+ src_filter = re.sub(r'[+-]' + d, '', src_filter)
|
121
|
118
|
|
122
|
|
- src_filter[0] = FEATURE_DEPENDENCIES[feature]['src_filter'] + ' ' + src_filter[0]
|
123
|
|
- proj.set("env:" + env["PIOENV"], "src_filter", src_filter)
|
|
119
|
+ src_filter = FEATURE_DEPENDENCIES[feature]['src_filter'] + ' ' + src_filter
|
|
120
|
+ proj.set("env:" + env["PIOENV"], "src_filter", [src_filter])
|
124
|
121
|
env.Replace(SRC_FILTER=src_filter)
|
125
|
122
|
|
126
|
123
|
# search the current compiler, considering the OS
|