summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/scons.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-09-09 00:42:30 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-09-09 00:42:30 +0000
commit36069a8b2ec362209f9d83508b24c610f601ba77 (patch)
tree66ad9950e24c07dc8920fdbb64d995cc4e96c0e6 /numpy/distutils/command/scons.py
parent24def43896bc3c7ae3baa1dbd969ea2704324322 (diff)
downloadnumpy-36069a8b2ec362209f9d83508b24c610f601ba77.tar.gz
Always set up scons_* compilers, and use those when building the scons command call.
Diffstat (limited to 'numpy/distutils/command/scons.py')
-rw-r--r--numpy/distutils/command/scons.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/numpy/distutils/command/scons.py b/numpy/distutils/command/scons.py
index e90bb8f2e..4aff61ae2 100644
--- a/numpy/distutils/command/scons.py
+++ b/numpy/distutils/command/scons.py
@@ -310,9 +310,14 @@ class scons(old_build_ext):
# is to be used in desperate cases (like incompatible visual studio
# version).
self._bypass_distutils_cc = False
+
+ # scons compilers
self.scons_compiler = None
self.scons_compiler_path = None
self.scons_fcompiler = None
+ self.scons_fcompiler_path = None
+ self.scons_cxxcompiler = None
+ self.scons_cxxcompiler_path = None
self.package_list = None
self.inplace = 0
@@ -349,6 +354,8 @@ class scons(old_build_ext):
if self.fcompiler is not None:
self.fcompiler.customize(self.distribution)
+ self.scons_fcompiler = dist2sconsfc(self.fcompiler)
+ self.scons_fcompiler_path = protect_path(get_f77_tool_path(self.fcompiler))
def _init_cxxcompiler(self, compiler_type):
cxxcompiler = new_compiler(compiler = compiler_type,
@@ -364,6 +371,10 @@ class scons(old_build_ext):
except DistutilsSetupError:
self.cxxcompiler = None
+ if self.cxxcompiler:
+ self.scons_cxxcompiler = dist2sconscxx(self.cxxcompiler)
+ self.scons_cxxcompiler_path = protect_path(get_cxx_tool_path(self.cxxcompiler))
+
def finalize_options(self):
old_build_ext.finalize_options(self)
if self.distribution.has_scons_scripts():
@@ -394,8 +405,8 @@ class scons(old_build_ext):
self._init_fcompiler(self.fcompiler)
self._init_cxxcompiler(self.compiler)
- if self.package_list:
- self.package_list = parse_package_list(self.package_list)
+ if self.package_list:
+ self.package_list = parse_package_list(self.package_list)
def run(self):
if len(self.sconscripts) < 1:
@@ -463,14 +474,13 @@ class scons(old_build_ext):
else:
cmd.append('cc_opt=%s' % self.scons_compiler)
+ if self.scons_fcompiler:
+ cmd.append('f77_opt=%s' % self.scons_fcompiler)
+ cmd.append('f77_opt_path=%s' % protect_path(self.scons_fcompiler_path))
- if self.fcompiler:
- cmd.append('f77_opt=%s' % dist2sconsfc(self.fcompiler))
- cmd.append('f77_opt_path=%s' % protect_path(get_f77_tool_path(self.fcompiler)))
-
- if self.cxxcompiler:
- cmd.append('cxx_opt=%s' % dist2sconscxx(self.cxxcompiler))
- cmd.append('cxx_opt_path=%s' % protect_path(get_cxx_tool_path(self.cxxcompiler)))
+ if self.scons_cxxcompiler:
+ cmd.append('cxx_opt=%s' % self.scons_cxxcompiler)
+ cmd.append('cxx_opt_path=%s' % protect_path(self.scons_cxxcompiler_path))
cmd.append('include_bootstrap=%s' % dirl_to_str(get_numpy_include_dirs(sconscript)))
if self.silent: