[Numpy-svn] r3849 - in trunk/numpy/distutils: . command

numpy-svn at scipy.org numpy-svn at scipy.org
Thu May 31 04:45:41 EDT 2007


Author: pearu
Date: 2007-05-31 03:45:30 -0500 (Thu, 31 May 2007)
New Revision: 3849

Modified:
   trunk/numpy/distutils/ccompiler.py
   trunk/numpy/distutils/command/build_ext.py
   trunk/numpy/distutils/command/config.py
Log:
Fix issues with undetected Fortran compilers.

Modified: trunk/numpy/distutils/ccompiler.py
===================================================================
--- trunk/numpy/distutils/ccompiler.py	2007-05-31 08:16:15 UTC (rev 3848)
+++ trunk/numpy/distutils/ccompiler.py	2007-05-31 08:45:30 UTC (rev 3849)
@@ -259,7 +259,7 @@
         version_cmd = self.version_cmd
     except AttributeError:
         return None
-    if not version_cmd or not version_cmd[0]:
+    if not version_cmd or not version_cmd[0] or None in version_cmd:
         return None
     cmd = ' '.join(version_cmd)
     try:

Modified: trunk/numpy/distutils/command/build_ext.py
===================================================================
--- trunk/numpy/distutils/command/build_ext.py	2007-05-31 08:16:15 UTC (rev 3848)
+++ trunk/numpy/distutils/command/build_ext.py	2007-05-31 08:45:30 UTC (rev 3849)
@@ -169,38 +169,44 @@
 
         # Initialize Fortran 77 compiler:
         if need_f77_compiler:
+            ctype = self.fcompiler
             self._f77_compiler = new_fcompiler(compiler=self.fcompiler,
                                                verbose=self.verbose,
                                                dry_run=self.dry_run,
                                                force=self.force,
                                                requiref90=False)
             fcompiler = self._f77_compiler
+            if fcompiler:
+                ctype = fcompiler.compiler_type
             if fcompiler and fcompiler.get_version():
                 fcompiler.customize(self.distribution)
                 fcompiler.customize_cmd(self)
                 fcompiler.show_customization()
             else:
                 self.warn('f77_compiler=%s is not available.' %
-                          (fcompiler.compiler_type))
+                          (ctype))
                 self._f77_compiler = None
         else:
             self._f77_compiler = None
 
         # Initialize Fortran 90 compiler:
         if need_f90_compiler:
+            ctype = self.fcompiler
             self._f90_compiler = new_fcompiler(compiler=self.fcompiler,
                                                verbose=self.verbose,
                                                dry_run=self.dry_run,
                                                force=self.force,
                                                requiref90=True)
             fcompiler = self._f90_compiler
+            if fcompiler:
+                ctype = fcompiler.compiler_type
             if fcompiler and fcompiler.get_version():
                 fcompiler.customize(self.distribution)
                 fcompiler.customize_cmd(self)
                 fcompiler.show_customization()
             else:
                 self.warn('f90_compiler=%s is not available.' %
-                          (fcompiler.compiler_type))
+                          (ctype))
                 self._f90_compiler = None
         else:
             self._f90_compiler = None

Modified: trunk/numpy/distutils/command/config.py
===================================================================
--- trunk/numpy/distutils/command/config.py	2007-05-31 08:16:15 UTC (rev 3848)
+++ trunk/numpy/distutils/command/config.py	2007-05-31 08:45:30 UTC (rev 3849)
@@ -28,7 +28,7 @@
         if not isinstance(self.fcompiler, FCompiler):
             self.fcompiler = new_fcompiler(compiler=self.fcompiler,
                                            dry_run=self.dry_run, force=1)
-            if self.fcompiler is not None:
+            if self.fcompiler is not None and self.fcompiler.get_version():
                 self.fcompiler.customize(self.distribution)
                 self.fcompiler.customize_cmd(self)
                 self.fcompiler.show_customization()




More information about the Numpy-svn mailing list