[Numpy-svn] r3855 - in trunk/numpy/distutils: . fcompiler

numpy-svn@scip... numpy-svn@scip...
Fri Jun 1 08:37:06 CDT 2007


Author: pearu
Date: 2007-06-01 08:36:59 -0500 (Fri, 01 Jun 2007)
New Revision: 3855

Modified:
   trunk/numpy/distutils/ccompiler.py
   trunk/numpy/distutils/fcompiler/__init__.py
Log:
Fixed detecting fortran compilers under windows.

Modified: trunk/numpy/distutils/ccompiler.py
===================================================================
--- trunk/numpy/distutils/ccompiler.py	2007-06-01 10:42:04 UTC (rev 3854)
+++ trunk/numpy/distutils/ccompiler.py	2007-06-01 13:36:59 UTC (rev 3855)
@@ -255,11 +255,12 @@
     """ Compiler version. Returns None if compiler is not available. """
     if not force and hasattr(self,'version'):
         return self.version
+    self.find_executables()
     try:
         version_cmd = self.version_cmd
     except AttributeError:
         return None
-    if not version_cmd or not version_cmd[0] or None in version_cmd:
+    if not version_cmd or not version_cmd[0]:
         return None
     cmd = ' '.join(version_cmd)
     try:
@@ -277,6 +278,7 @@
             return version
 
     status, output = exec_command(cmd,use_tee=0)
+
     version = None
     if status in ok_status:
         version = matcher(output)

Modified: trunk/numpy/distutils/fcompiler/__init__.py
===================================================================
--- trunk/numpy/distutils/fcompiler/__init__.py	2007-06-01 10:42:04 UTC (rev 3854)
+++ trunk/numpy/distutils/fcompiler/__init__.py	2007-06-01 13:36:59 UTC (rev 3855)
@@ -257,18 +257,23 @@
                     return fc_exe
             return None
 
+        ctype = self.compiler_type
         f90 = set_exe('compiler_f90')
-#        if not f90:
-#            raise CompilerNotFound('f90')
-        f77 = set_exe('compiler_f77', f90=f90)
-        if not f77:
-            raise CompilerNotFound('f77')
-        set_exe('compiler_fix', f90=f90)
+        if not f90:
+            f77 = set_exe('compiler_f77')
+            if f77:
+                log.warn('%s: no Fortran 90 compiler found' % ctype)
+            else:
+                raise CompilerNotFound('%s: f90 nor f77' % ctype)
+        else:
+            f77 = set_exe('compiler_f77', f90=f90)
+            if not f77:
+                log.warn('%s: no Fortran 77 compiler found' % ctype)
+            set_exe('compiler_fix', f90=f90)
 
         set_exe('linker_so', f77=f77, f90=f90)
         set_exe('linker_exe', f77=f77, f90=f90)
         set_exe('version_cmd', f77=f77, f90=f90)
-
         set_exe('archiver')
         set_exe('ranlib')
 
@@ -385,7 +390,7 @@
 
     ## Public methods:
 
-    def customize(self, dist):
+    def customize(self, dist = None):
         """Customize Fortran compiler.
 
         This method gets Fortran compiler specific information from



More information about the Numpy-svn mailing list