summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/build_ext.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2006-10-08 09:30:17 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2006-10-08 09:30:17 +0000
commit45e92465815e16d02a611005b61abc6a65f6b91c (patch)
tree7cb75b38697c04be28bac4a388a5c8b71db5373c /numpy/distutils/command/build_ext.py
parentcc7fd3d7d62f4bc6ee17456d282475781204f98e (diff)
downloadnumpy-45e92465815e16d02a611005b61abc6a65f6b91c.tar.gz
numpy.distutils: use language flag or source file extension to select default f77 or f90 compiler.
Diffstat (limited to 'numpy/distutils/command/build_ext.py')
-rw-r--r--numpy/distutils/command/build_ext.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py
index 9958f5d8b..5f09ea1e3 100644
--- a/numpy/distutils/command/build_ext.py
+++ b/numpy/distutils/command/build_ext.py
@@ -75,6 +75,13 @@ class build_ext (old_build_ext):
need_f_compiler = 1
break
+ requiref90 = 0
+ if need_f_compiler:
+ for ext in self.extensions:
+ if getattr(ext,'language','c')=='f90':
+ requiref90 = 1
+ break
+
# Determine if C++ compiler is needed.
need_cxx_compiler = 0
for ext in self.extensions:
@@ -100,7 +107,8 @@ class build_ext (old_build_ext):
self.fcompiler = new_fcompiler(compiler=self.fcompiler,
verbose=self.verbose,
dry_run=self.dry_run,
- force=self.force)
+ force=self.force,
+ requiref90=requiref90)
if self.fcompiler.get_version():
self.fcompiler.customize(self.distribution)
self.fcompiler.customize_cmd(self)