[Numpy-svn] r3563 - trunk/numpy/distutils/fcompiler

numpy-svn@scip... numpy-svn@scip...
Wed Feb 28 07:12:10 CST 2007


Author: pearu
Date: 2007-02-28 07:12:06 -0600 (Wed, 28 Feb 2007)
New Revision: 3563

Modified:
   trunk/numpy/distutils/fcompiler/ibm.py
Log:
Added support for xml Fortran V10 compiler (needs testing).

Modified: trunk/numpy/distutils/fcompiler/ibm.py
===================================================================
--- trunk/numpy/distutils/fcompiler/ibm.py	2007-02-28 05:24:26 UTC (rev 3562)
+++ trunk/numpy/distutils/fcompiler/ibm.py	2007-02-28 13:12:06 UTC (rev 3563)
@@ -8,8 +8,8 @@
 class IbmFCompiler(FCompiler):
 
     compiler_type = 'ibm'
-    version_pattern =  r'xlf\(1\)\s*IBM XL Fortran (Advanced Edition |)Version (?P<version>[^\s*]*)'
-
+    version_pattern =  r'(xlf\(1\)\s*|)IBM XL Fortran ((Advanced Edition |)Version |Enterprise Edition V)(?P<version>[^\s*]*)'
+    #IBM XL Fortran Enterprise Edition V10.1 for AIX \nVersion: 10.01.0000.0004
     executables = {
         'version_cmd'  : ["xlf"],
         'compiler_f77' : ["xlf"],
@@ -22,6 +22,16 @@
 
     def get_version(self,*args,**kwds):
         version = FCompiler.get_version(self,*args,**kwds)
+
+        if version is None:
+            # Let's try version_cmd with -qversion flag that V10 supports:
+            l = self.__class__.executables['version_cmd']
+            if '-qversion' not in l:
+                l.append('-qversion')
+                version = FCompiler.get_version(self,*args,**kwds)
+                if version is None:
+                    l.remove('-qversion')
+                
         xlf_dir = '/etc/opt/ibmcmp/xlf'
         if version is None and os.path.isdir(xlf_dir):
             # If the output of xlf does not contain version info



More information about the Numpy-svn mailing list