@@ -916,7 +916,7 @@ def fromrepo(cls, path=None):
916
916
917
917
repo .path = os .path .abspath (path )
918
918
repo .name = os .path .basename (repo .path )
919
-
919
+
920
920
cache_cfg = Global ().get_cfg ('CACHE' , '' )
921
921
if cache_repositories and cache_cfg and cache_cfg != 'none' and cache_cfg != 'off' and cache_cfg != 'disabled' :
922
922
loc = cache_cfg if (cache_cfg and cache_cfg != 'on' and cache_cfg != 'enabled' ) else None
@@ -2175,7 +2175,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
2175
2175
source = [os .path .relpath (program .path , orig_path )]
2176
2176
2177
2177
if supported :
2178
- popen (['python ' , '-u' , os .path .join (tools_dir , 'make.py' )]
2178
+ popen (['python2 ' , '-u' , os .path .join (tools_dir , 'make.py' )]
2179
2179
+ (['-S' ] if supported else []) + (['-v' ] if very_verbose else [])
2180
2180
+ (['--app-config' , app_config ] if app_config else [])
2181
2181
+ args ,
@@ -2188,7 +2188,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
2188
2188
2189
2189
if compile_config :
2190
2190
# Compile configuration
2191
- popen (['python ' , os .path .join (tools_dir , 'get_config.py' )]
2191
+ popen (['python2 ' , os .path .join (tools_dir , 'get_config.py' )]
2192
2192
+ ['-t' , tchain , '-m' , target ]
2193
2193
+ list (chain .from_iterable (izip (repeat ('--profile' ), profile or [])))
2194
2194
+ list (chain .from_iterable (izip (repeat ('--source' ), source )))
@@ -2199,15 +2199,15 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
2199
2199
# If the user hasn't supplied a build directory, ignore the default build directory
2200
2200
if not build :
2201
2201
program .ignore_build_dir ()
2202
-
2202
+
2203
2203
build_path = build
2204
2204
2205
2205
if compile_library :
2206
2206
# Compile as a library (current dir is default)
2207
2207
if not build_path :
2208
2208
build_path = os .path .join (os .path .relpath (program .path , orig_path ), program .build_dir , 'libraries' , os .path .basename (orig_path ), target , tchain )
2209
2209
2210
- popen (['python ' , '-u' , os .path .join (tools_dir , 'build.py' )]
2210
+ popen (['python2 ' , '-u' , os .path .join (tools_dir , 'build.py' )]
2211
2211
+ list (chain .from_iterable (izip (repeat ('-D' ), macros )))
2212
2212
+ ['-t' , tchain , '-m' , target ]
2213
2213
+ list (chain .from_iterable (izip (repeat ('--profile' ), profile or [])))
@@ -2223,7 +2223,7 @@ def compile_(toolchain=None, target=None, profile=False, compile_library=False,
2223
2223
if not build_path :
2224
2224
build_path = os .path .join (os .path .relpath (program .path , orig_path ), program .build_dir , target , tchain )
2225
2225
2226
- popen (['python ' , '-u' , os .path .join (tools_dir , 'make.py' )]
2226
+ popen (['python2 ' , '-u' , os .path .join (tools_dir , 'make.py' )]
2227
2227
+ list (chain .from_iterable (izip (repeat ('-D' ), macros )))
2228
2228
+ ['-t' , tchain , '-m' , target ]
2229
2229
+ list (chain .from_iterable (izip (repeat ('--profile' ), profile or [])))
@@ -2292,7 +2292,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
2292
2292
test_spec = os .path .join (build_path , 'test_spec.json' )
2293
2293
2294
2294
if compile_list :
2295
- popen (['python ' , '-u' , os .path .join (tools_dir , 'test.py' ), '--list' ]
2295
+ popen (['python2 ' , '-u' , os .path .join (tools_dir , 'test.py' ), '--list' ]
2296
2296
+ list (chain .from_iterable (izip (repeat ('--profile' ), profile or [])))
2297
2297
+ ['-t' , tchain , '-m' , target ]
2298
2298
+ list (chain .from_iterable (izip (repeat ('--source' ), source )))
@@ -2307,7 +2307,7 @@ def test_(toolchain=None, target=None, compile_list=False, run_list=False, compi
2307
2307
if not build :
2308
2308
program .ignore_build_dir ()
2309
2309
2310
- popen (['python ' , '-u' , os .path .join (tools_dir , 'test.py' )]
2310
+ popen (['python2 ' , '-u' , os .path .join (tools_dir , 'test.py' )]
2311
2311
+ list (chain .from_iterable (izip (repeat ('-D' ), macros )))
2312
2312
+ list (chain .from_iterable (izip (repeat ('--profile' ), profile or [])))
2313
2313
+ ['-t' , tchain , '-m' , target ]
@@ -2364,7 +2364,7 @@ def export(ide=None, target=None, source=False, clean=False, supported=False):
2364
2364
env = program .get_env ()
2365
2365
2366
2366
if supported :
2367
- popen (['python ' , '-u' , os .path .join (tools_dir , 'project.py' )]
2367
+ popen (['python2 ' , '-u' , os .path .join (tools_dir , 'project.py' )]
2368
2368
+ (['-S' ] if supported else []) + (['-v' ] if very_verbose else []),
2369
2369
env = env )
2370
2370
return
@@ -2377,10 +2377,10 @@ def export(ide=None, target=None, source=False, clean=False, supported=False):
2377
2377
2378
2378
if not source or len (source ) == 0 :
2379
2379
source = [os .path .relpath (program .path , orig_path )]
2380
-
2380
+
2381
2381
program .ignore_build_dir ()
2382
2382
2383
- popen (['python ' , '-u' , os .path .join (tools_dir , 'project.py' )]
2383
+ popen (['python2 ' , '-u' , os .path .join (tools_dir , 'project.py' )]
2384
2384
+ list (chain .from_iterable (izip (repeat ('-D' ), macros )))
2385
2385
+ ['-i' , ide .lower ()]
2386
2386
+ ['-m' , target ]
@@ -2412,7 +2412,7 @@ def detect():
2412
2412
# Prepare environment variables
2413
2413
env = program .get_env ()
2414
2414
2415
- popen (['python ' , '-u' , os .path .join (tools_dir , 'detect_targets.py' )]
2415
+ popen (['python2 ' , '-u' , os .path .join (tools_dir , 'detect_targets.py' )]
2416
2416
+ args ,
2417
2417
env = env )
2418
2418
else :
0 commit comments