summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/scons.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2009-09-09 00:43:34 +0000
committerDavid Cournapeau <cournape@gmail.com>2009-09-09 00:43:34 +0000
commitcc9799e0981534cbb40ac6075bcefd90bdefdb87 (patch)
tree263e9ed25f152c2add82c058d85f225cf75ddd2a /numpy/distutils/command/scons.py
parent36069a8b2ec362209f9d83508b24c610f601ba77 (diff)
downloadnumpy-cc9799e0981534cbb40ac6075bcefd90bdefdb87.tar.gz
Add user options for compilers in scons command.
When removing build_ext options, we removed the compiler options as well. We add the compiler options back, and treat C, C++ and Fortran compilers as separate.
Diffstat (limited to 'numpy/distutils/command/scons.py')
-rw-r--r--numpy/distutils/command/scons.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/numpy/distutils/command/scons.py b/numpy/distutils/command/scons.py
index 4aff61ae2..b887d598c 100644
--- a/numpy/distutils/command/scons.py
+++ b/numpy/distutils/command/scons.py
@@ -299,10 +299,21 @@ class scons(old_build_ext):
('package-list=', None,
'If specified, only run scons on the given '\
'packages (example: --package-list=scipy.cluster). If empty, '\
- 'no package is built')]
+ 'no package is built'),
+ ('fcompiler=', None,
+ "specify the Fortran compiler type"),
+ ('compiler=', None,
+ "specify the C compiler type"),
+ ('cxxcompiler=', None,
+ "specify the C++ compiler type (same as C by default)"),
+ ]
def initialize_options(self):
old_build_ext.initialize_options(self)
+ self.compiler = None
+ self.cxxcompiler = None
+ self.fcompiler = None
+
self.jobs = None
self.silent = 0
self.scons_tool_path = ''
@@ -388,6 +399,9 @@ class scons(old_build_ext):
self.post_hooks = []
self.pkg_names = []
+ if not self.cxxcompiler:
+ self.cxxcompiler = self.compiler
+
# To avoid trouble, just don't do anything if no sconscripts are used.
# This is useful when for example f2py uses numpy.distutils, because
# f2py does not pass compiler information to scons command, and the
@@ -403,7 +417,7 @@ class scons(old_build_ext):
self._init_ccompiler(self.compiler)
self._init_fcompiler(self.fcompiler)
- self._init_cxxcompiler(self.compiler)
+ self._init_cxxcompiler(self.cxxcompiler)
if self.package_list:
self.package_list = parse_package_list(self.package_list)