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

Skip to content

Commit 2d078a1

Browse files
committed
Do not pass compiler path options to scons if they were not set.
1 parent d00fe70 commit 2d078a1

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

numpy/distutils/command/scons.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,17 +494,20 @@ def run(self):
494494

495495
if not self._bypass_distutils_cc:
496496
cmd.append('cc_opt=%s' % self.scons_compiler)
497-
cmd.append('cc_opt_path=%s' % self.scons_compiler_path)
497+
if self.scons_compiler_path:
498+
cmd.append('cc_opt_path=%s' % self.scons_compiler_path)
498499
else:
499500
cmd.append('cc_opt=%s' % self.scons_compiler)
500501

501502
if self.scons_fcompiler:
502503
cmd.append('f77_opt=%s' % self.scons_fcompiler)
503-
cmd.append('f77_opt_path=%s' % protect_path(self.scons_fcompiler_path))
504+
if self.scons_fcompiler_path:
505+
cmd.append('f77_opt_path=%s' % protect_path(self.scons_fcompiler_path))
504506

505507
if self.scons_cxxcompiler:
506508
cmd.append('cxx_opt=%s' % self.scons_cxxcompiler)
507-
cmd.append('cxx_opt_path=%s' % protect_path(self.scons_cxxcompiler_path))
509+
if self.scons_cxxcompiler_path:
510+
cmd.append('cxx_opt_path=%s' % protect_path(self.scons_cxxcompiler_path))
508511

509512
cmd.append('include_bootstrap=%s' % dirl_to_str(get_numpy_include_dirs(sconscript)))
510513
if self.silent:

0 commit comments

Comments
 (0)