Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 957cd79

Browse files
committed
Add option to import user environment into numscons.
1 parent 2eae961 commit 957cd79

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

numpy/distutils/command/scons.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ class scons(old_build_ext):
307307
('jobs=', 'j', "specify number of worker threads when executing" \
308308
"scons"),
309309
('inplace', 'i', 'If specified, build in place.'),
310+
('import-env', 'e', 'If specified, import user environment into scons env["ENV"].'),
310311
('bypass', 'b', 'Bypass distutils compiler detection (experimental).'),
311312
('scons-tool-path=', None, 'specify additional path '\
312313
'(absolute) to look for scons tools'),
@@ -334,6 +335,7 @@ def initialize_options(self):
334335

335336
self.jobs = None
336337
self.silent = 0
338+
self.import_env = 0
337339
self.scons_tool_path = ''
338340
# If true, we bypass distutils to find the c compiler altogether. This
339341
# is to be used in desperate cases (like incompatible visual studio
@@ -505,6 +507,7 @@ def _call_scons(self, scons_exec, sconscript, pkg_name, bootstrapping):
505507

506508
cmd.append('include_bootstrap=%s' % dirl_to_str(get_numpy_include_dirs(sconscript)))
507509
cmd.append('bypass=%s' % self.bypass)
510+
cmd.append('import_env=%s' % self.import_env)
508511
if self.silent:
509512
if int(self.silent) == 2:
510513
cmd.append('-Q')

0 commit comments

Comments
 (0)