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

numpy-svn@scip... numpy-svn@scip...
Wed Apr 4 13:10:43 CDT 2007


Author: cookedm
Date: 2007-04-04 13:10:30 -0500 (Wed, 04 Apr 2007)
New Revision: 3664

Modified:
   trunk/numpy/distutils/fcompiler/__init__.py
   trunk/numpy/distutils/fcompiler/ibm.py
Log:
Really fix linking with Fortran on AIX


Modified: trunk/numpy/distutils/fcompiler/__init__.py
===================================================================
--- trunk/numpy/distutils/fcompiler/__init__.py	2007-04-04 17:47:57 UTC (rev 3663)
+++ trunk/numpy/distutils/fcompiler/__init__.py	2007-04-04 18:10:30 UTC (rev 3664)
@@ -10,8 +10,7 @@
 import os
 import sys
 import re
-from types import StringType,NoneType
-from distutils.sysconfig import get_config_var
+from distutils.sysconfig import get_config_var, get_python_lib
 from distutils.fancy_getopt import FancyGetopt
 from distutils.errors import DistutilsModuleError,DistutilsArgError,\
      DistutilsExecError,CompileError,LinkError,DistutilsPlatformError
@@ -338,7 +337,14 @@
         linker_so = self.__get_cmd(self.get_linker_so,'LDSHARED')
         if linker_so:
             linker_so_flags = self.__get_flags(self.get_flags_linker_so,'LDFLAGS')
-            self.set_executables(linker_so=[linker_so]+linker_so_flags)
+            if sys.platform.startswith('aix'):
+                python_lib = get_python_lib(standard_lib=1)
+                ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix')
+                python_exp = os.path.join(python_lib, 'config', 'python.exp')
+                linker_so = [ld_so_aix, linker_so, '-bI:'+python_exp]
+            else:
+                linker_so = [linker_so]
+            self.set_executables(linker_so=linker_so+linker_so_flags)
 
         linker_exe = self.__get_cmd(self.get_linker_exe,'LD')
         if linker_exe:

Modified: trunk/numpy/distutils/fcompiler/ibm.py
===================================================================
--- trunk/numpy/distutils/fcompiler/ibm.py	2007-04-04 17:47:57 UTC (rev 3663)
+++ trunk/numpy/distutils/fcompiler/ibm.py	2007-04-04 18:10:30 UTC (rev 3664)
@@ -49,15 +49,6 @@
                 self.version = version = LooseVersion(l[0])
         return version
 
-    def get_linker_so(self):
-        if sys.platform.startswith('aix'):
-            python_lib = get_python_lib(standard_lib=1)
-            ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix')
-            python_exp = os.path.join(python_lib, 'config', 'python.exp')
-            return [ld_so_aix, self.executables['linker_so'], python_exp]
-        else:
-            return FCompiler.get_linker_so(self)
-
     def get_flags(self):
         return ['-qextname']
 



More information about the Numpy-svn mailing list