summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ginsburg <keflavich@gmail.com>2013-04-18 09:40:17 -0600
committerAdam Ginsburg <keflavich@gmail.com>2013-04-18 09:40:17 -0600
commit9016aa47a65fc2e3b19c82d01174f591655e517d (patch)
treef8b50f17e22a7b05dfb92fbe964195437e8d814b
parent1975606394d577421c4b4e21abb8fdadbdc572c0 (diff)
downloadnumpy-9016aa47a65fc2e3b19c82d01174f591655e517d.tar.gz
bugfix in build_ext: check that ext has an attribute before trying to
use it
-rw-r--r--numpy/distutils/command/build_ext.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py
index 48e578b66..6cd8f10e4 100644
--- a/numpy/distutils/command/build_ext.py
+++ b/numpy/distutils/command/build_ext.py
@@ -297,8 +297,8 @@ class build_ext (old_build_ext):
else: # in case ext.language is c++, for instance
fcompiler = self._f90_compiler or self._f77_compiler
if fcompiler is not None:
- fcompiler.extra_f77_compile_args = ext.extra_f77_compile_args or []
- fcompiler.extra_f90_compile_args = ext.extra_f90_compile_args or []
+ fcompiler.extra_f77_compile_args = ext.extra_f77_compile_args or [] if hasattr(ext,'extra_f77_compile_args') else []
+ fcompiler.extra_f90_compile_args = ext.extra_f90_compile_args or [] if hasattr(ext,'extra_f90_compile_args') else []
cxx_compiler = self._cxx_compiler
# check for the availability of required compilers