@@ -348,7 +348,18 @@ def build_project(args):
348
348
cmd += ['build' ]
349
349
if args .parallel > 1 :
350
350
cmd += ['-j' , str (args .parallel )]
351
- cmd += ['install' , '--prefix=' + dst_dir ]
351
+ # Install; avoid producing eggs so scipy can be imported from dst_dir.
352
+ cmd += ['install' , '--prefix=' + dst_dir ,
353
+ '--single-version-externally-managed' ,
354
+ '--record=' + dst_dir + 'tmp_install_log.txt' ]
355
+
356
+ from distutils .sysconfig import get_python_lib
357
+ site_dir = get_python_lib (prefix = dst_dir , plat_specific = True )
358
+ # easy_install won't install to a path that Python by default cannot see
359
+ # and isn't on the PYTHONPATH. Plus, it has to exist.
360
+ if not os .path .exists (site_dir ):
361
+ os .makedirs (site_dir )
362
+ env ['PYTHONPATH' ] = site_dir
352
363
353
364
log_filename = os .path .join (ROOT_DIR , 'build.log' )
354
365
@@ -391,9 +402,6 @@ def build_project(args):
391
402
print ("Build failed!" )
392
403
sys .exit (1 )
393
404
394
- from distutils .sysconfig import get_python_lib
395
- site_dir = get_python_lib (prefix = dst_dir , plat_specific = True )
396
-
397
405
return site_dir
398
406
399
407
@@ -429,8 +437,8 @@ def lcov_generate():
429
437
'--output-file' , LCOV_OUTPUT_FILE ])
430
438
431
439
print ("Generating lcov HTML output..." )
432
- ret = subprocess .call (['genhtml' , '-q' , LCOV_OUTPUT_FILE ,
433
- '--output-directory' , LCOV_HTML_DIR ,
440
+ ret = subprocess .call (['genhtml' , '-q' , LCOV_OUTPUT_FILE ,
441
+ '--output-directory' , LCOV_HTML_DIR ,
434
442
'--legend' , '--highlight' ])
435
443
if ret != 0 :
436
444
print ("genhtml failed!" )
0 commit comments