File tree Expand file tree Collapse file tree
numpy/distutils/fcompiler Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99from numpy .distutils .fcompiler import FCompiler
1010from numpy .distutils .exec_command import exec_command
1111from numpy .distutils .misc_util import msvc_runtime_library
12+ from numpy .distutils .compat import get_exception
1213
1314compilers = ['GnuFCompiler' , 'Gnu95FCompiler' ]
1415
@@ -197,7 +198,8 @@ def get_flags_debug(self):
197198 return ['-g' ]
198199
199200 def get_flags_opt (self ):
200- if self .get_version ()<= '3.3.3' :
201+ v = self .get_version ()
202+ if v and v <= '3.3.3' :
201203 # With this compiler version building Fortran BLAS/LAPACK
202204 # with -O3 caused failures in lib.lapack heevr,syevr tests.
203205 opt = ['-O2' ]
@@ -352,6 +354,7 @@ def _can_target(cmd, arch):
352354 compiler = Gnu95FCompiler ()
353355 compiler .customize ()
354356 print (compiler .get_version ())
355- except Exception , msg :
357+ except Exception :
358+ msg = get_exception ()
356359 print (msg )
357360 raw_input ('Press ENTER to continue...' )
You can’t perform that action at this time.
0 commit comments