[Numpy-svn] r4549 - in branches/numpy.scons: . numpy/core/tests numpy/distutils/fcompiler numpy/f2py

numpy-svn at scipy.org numpy-svn at scipy.org
Tue Dec 4 08:45:53 EST 2007


Author: cdavid
Date: 2007-12-04 07:45:21 -0600 (Tue, 04 Dec 2007)
New Revision: 4549

Added:
   branches/numpy.scons/numpy/core/tests/test_ufunc.py
Modified:
   branches/numpy.scons/
   branches/numpy.scons/numpy/distutils/fcompiler/intel.py
   branches/numpy.scons/numpy/f2py/rules.py
Log:
Merged revisions 4530-4548 via svnmerge from 
http://svn.scipy.org/svn/numpy/trunk

........
  r4533 | rkern | 2007-12-04 14:33:42 +0900 (Tue, 04 Dec 2007) | 1 line
  
  The PIC flag changed in the 10 version of the Intel Fortran compiler.
........
  r4538 | rkern | 2007-12-04 15:58:41 +0900 (Tue, 04 Dec 2007) | 1 line
  
  Another string method conversion typo.
........
  r4540 | rkern | 2007-12-04 16:58:37 +0900 (Tue, 04 Dec 2007) | 1 line
  
  Use the correct link parameters for shared libraries with Intel Fortran on OS X.
........
  r4541 | rkern | 2007-12-04 17:02:06 +0900 (Tue, 04 Dec 2007) | 1 line
  
  Typo.
........
  r4548 | stefan | 2007-12-04 21:57:48 +0900 (Tue, 04 Dec 2007) | 2 lines
  
  Add test_ufunc.
........



Property changes on: branches/numpy.scons
___________________________________________________________________
Name: svnmerge-integrated
   - /branches/distutils-revamp:1-2752 /branches/multicore:1-3687 /trunk:1-4529
   + /branches/distutils-revamp:1-2752 /branches/multicore:1-3687 /trunk:1-4548

Copied: branches/numpy.scons/numpy/core/tests/test_ufunc.py (from rev 4548, trunk/numpy/core/tests/test_ufunc.py)

Modified: branches/numpy.scons/numpy/distutils/fcompiler/intel.py
===================================================================
--- branches/numpy.scons/numpy/distutils/fcompiler/intel.py	2007-12-04 12:57:48 UTC (rev 4548)
+++ branches/numpy.scons/numpy/distutils/fcompiler/intel.py	2007-12-04 13:45:21 UTC (rev 4549)
@@ -3,6 +3,8 @@
 # of intele
 # http://developer.intel.com/software/products/compilers/flin/
 
+import sys
+
 from numpy.distutils.cpuinfo import cpu
 from numpy.distutils.ccompiler import simple_version_match
 from numpy.distutils.fcompiler import FCompiler, dummy_fortran_file
@@ -40,12 +42,18 @@
         'ranlib'       : ["ranlib"]
         }
 
-    pic_flags = ['-KPIC']
+    pic_flags = ['-fPIC']
     module_dir_switch = '-module ' # Don't remove ending space!
     module_include_switch = '-I'
 
     def get_flags(self):
-        opt = self.pic_flags + ["-cm"]
+        v = self.get_version()
+        if v >= '10.0':
+            # Use -fPIC instead of -KPIC.
+            pic_flags = ['-fPIC']
+        else:
+            pic_flags = ['-KPIC']
+        opt = pic_flags + ["-cm"]
         return opt
 
     def get_flags_free(self):
@@ -99,6 +107,14 @@
         v = self.get_version()
         if v and v >= '8.0':
             opt.append('-nofor_main')
+        if sys.platform == 'darwin':
+            # Here, it's -dynamiclib
+            try:
+                idx = opt.index('-shared')
+                opt.remove('-shared')
+            except ValueError:
+                idx = 0
+            opt[idx:idx] = ['-dynamiclib', '-Wl,-undefined,dynamic_lookup']
         return opt
 
 class IntelItaniumFCompiler(IntelFCompiler):
@@ -144,14 +160,6 @@
         'ranlib'       : ["ranlib"]
         }
 
-    def get_flags(self):
-        v = self.get_version()
-        if v >= '10.0':
-            # Use -fPIC instead of -KPIC.
-            return ['-fPIC', '-cm']
-        else:
-            return IntelFCompiler.get_flags(self)
-
     def get_flags_arch(self):
         opt = []
         if cpu.is_PentiumIV() or cpu.is_Xeon():

Modified: branches/numpy.scons/numpy/f2py/rules.py
===================================================================
--- branches/numpy.scons/numpy/f2py/rules.py	2007-12-04 12:57:48 UTC (rev 4548)
+++ branches/numpy.scons/numpy/f2py/rules.py	2007-12-04 13:45:21 UTC (rev 4549)
@@ -1229,7 +1229,7 @@
         f.write('!     This file is autogenerated with f2py (version:%s)\n'%(f2py_version))
         f.write('!     It contains Fortran 90 wrappers to fortran functions.\n')
         lines = []
-        for l in '\n\n'.join(funcwrappers2)+'\n'.split('\n'):
+        for l in ('\n\n'.join(funcwrappers2)+'\n').split('\n'):
             if len(l)>72 and l[0]==' ':
                 lines.append(l[:72]+'&\n     &')
                 l = l[72:]




More information about the Numpy-svn mailing list