diff options
author | David Cournapeau <cournape@gmail.com> | 2009-12-03 16:03:01 +0000 |
---|---|---|
committer | David Cournapeau <cournape@gmail.com> | 2009-12-03 16:03:01 +0000 |
commit | 90e79bd64d139f7938660635cbce558c39d98053 (patch) | |
tree | 53cc236746e7212bb6a13aa8e8201c047018563b | |
parent | 6603acb88bd9ebf3dbcdd0f85f555cfc6f952228 (diff) | |
download | numpy-90e79bd64d139f7938660635cbce558c39d98053.tar.gz |
Py3k: Fix comparison when version is None.
-rw-r--r-- | numpy/distutils/fcompiler/gnu.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/numpy/distutils/fcompiler/gnu.py b/numpy/distutils/fcompiler/gnu.py index e0a4f6186..74ea5db4d 100644 --- a/numpy/distutils/fcompiler/gnu.py +++ b/numpy/distutils/fcompiler/gnu.py @@ -9,6 +9,7 @@ from numpy.distutils.cpuinfo import cpu from numpy.distutils.fcompiler import FCompiler from numpy.distutils.exec_command import exec_command from numpy.distutils.misc_util import msvc_runtime_library +from numpy.distutils.compat import get_exception compilers = ['GnuFCompiler', 'Gnu95FCompiler'] @@ -197,7 +198,8 @@ class GnuFCompiler(FCompiler): return ['-g'] def get_flags_opt(self): - if self.get_version()<='3.3.3': + v = self.get_version() + if v and v<='3.3.3': # With this compiler version building Fortran BLAS/LAPACK # with -O3 caused failures in lib.lapack heevr,syevr tests. opt = ['-O2'] @@ -352,6 +354,7 @@ if __name__ == '__main__': compiler = Gnu95FCompiler() compiler.customize() print(compiler.get_version()) - except Exception, msg: + except Exception: + msg = get_exception() print(msg) raw_input('Press ENTER to continue...') |