Selaa lähdekoodia

Fix Python 2.7 compatibility

Fix regression from #20692
Scott Lahteine 3 vuotta sitten
vanhempi
commit
8ffae97128
1 muutettua tiedostoa jossa 10 lisäystä ja 10 poistoa
  1. 10
    10
      buildroot/share/PlatformIO/scripts/common-dependencies.py

+ 10
- 10
buildroot/share/PlatformIO/scripts/common-dependencies.py Näytä tiedosto

@@ -132,7 +132,7 @@ def force_ignore_unused_libs():
132 132
 	known_libs = get_all_known_libs()
133 133
 	diff = (list(set(known_libs) - set(env_libs)))
134 134
 	lib_ignore = env.GetProjectOption('lib_ignore') + diff
135
-	blab(f'Ignore libraries: {lib_ignore}')
135
+	blab("Ignore libraries: %s" % lib_ignore)
136 136
 	set_env_field('lib_ignore', lib_ignore)
137 137
 
138 138
 def apply_features_config():
@@ -144,7 +144,7 @@ def apply_features_config():
144 144
 		feat = FEATURE_CONFIG[feature]
145 145
 
146 146
 		if 'lib_deps' in feat and len(feat['lib_deps']):
147
-			blab(f'Adding lib_deps for {feature}...')
147
+			blab("Adding lib_deps for %s... " % feature)
148 148
 
149 149
 			# feat to add
150 150
 			deps_to_add = {}
@@ -173,16 +173,16 @@ def apply_features_config():
173 173
 
174 174
 		if 'build_flags' in feat:
175 175
 			f = feat['build_flags']
176
-			blab(f'Adding build_flags for {feature}: {f}')
176
+			blab("Adding build_flags for %s: %s" % (feature, f))
177 177
 			new_flags = env.GetProjectOption('build_flags') + [ f ]
178 178
 			env.Replace(BUILD_FLAGS=new_flags)
179 179
 
180 180
 		if 'extra_scripts' in feat:
181
-			blab(f'Running extra_scripts for {feature}...')
181
+			blab("Running extra_scripts for %s... " % feature)
182 182
 			env.SConscript(feat['extra_scripts'], exports="env")
183 183
 
184 184
 		if 'src_filter' in feat:
185
-			blab(f'Adding src_filter for {feature}...')
185
+			blab("Adding src_filter for %s... " % feature)
186 186
 			src_filter = ' '.join(env.GetProjectOption('src_filter'))
187 187
 			# first we need to remove the references to the same folder
188 188
 			my_srcs = re.findall( r'[+-](<.*?>)', feat['src_filter'])
@@ -196,7 +196,7 @@ def apply_features_config():
196 196
 			env.Replace(SRC_FILTER=src_filter)
197 197
 
198 198
 		if 'lib_ignore' in feat:
199
-			blab(f'Adding lib_ignore for {feature}...')
199
+			blab("Adding lib_ignore for %s... " % feature)
200 200
 			lib_ignore = env.GetProjectOption('lib_ignore') + [feat['lib_ignore']]
201 201
 			set_env_field('lib_ignore', lib_ignore)
202 202
 
@@ -208,13 +208,13 @@ GCC_PATH_CACHE = os.path.join(ENV_BUILD_PATH, ".gcc_path")
208 208
 def search_compiler():
209 209
 	try:
210 210
 		filepath = env.GetProjectOption('custom_gcc')
211
-		blab('Getting compiler from env')
211
+		blab("Getting compiler from env")
212 212
 		return filepath
213 213
 	except:
214 214
 		pass
215 215
 
216 216
 	if os.path.exists(GCC_PATH_CACHE):
217
-		blab('Getting g++ path from cache')
217
+		blab("Getting g++ path from cache")
218 218
 		with open(GCC_PATH_CACHE, 'r') as f:
219 219
 			return f.read()
220 220
 
@@ -241,14 +241,14 @@ def search_compiler():
241 241
 			filepath = os.path.sep.join([pathdir, filepath])
242 242
 			# Cache the g++ path to no search always
243 243
 			if os.path.exists(ENV_BUILD_PATH):
244
-				blab('Caching g++ for current env')
244
+				blab("Caching g++ for current env")
245 245
 				with open(GCC_PATH_CACHE, 'w+') as f:
246 246
 					f.write(filepath)
247 247
 
248 248
 			return filepath
249 249
 
250 250
 	filepath = env.get('CXX')
251
-	blab(f"Couldn't find a compiler! Fallback to {filepath}")
251
+	blab("Couldn't find a compiler! Fallback to %s" % filepath)
252 252
 	return filepath
253 253
 
254 254
 #

Loading…
Peruuta
Tallenna