[Numpy-svn] r4172 - branches/numpy.scons/numpy/distutils/scons

numpy-svn@scip... numpy-svn@scip...
Wed Oct 10 07:47:02 CDT 2007


Author: cdavid
Date: 2007-10-10 07:46:47 -0500 (Wed, 10 Oct 2007)
New Revision: 4172

Modified:
   branches/numpy.scons/numpy/distutils/scons/extension_scons.py
Log:
Making PythonExtension builder work on mac os X

Modified: branches/numpy.scons/numpy/distutils/scons/extension_scons.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/extension_scons.py	2007-10-10 10:04:06 UTC (rev 4171)
+++ branches/numpy.scons/numpy/distutils/scons/extension_scons.py	2007-10-10 12:46:47 UTC (rev 4172)
@@ -33,9 +33,14 @@
             # XXX: We add the path where to find python2.5.lib (or any other
             # version, of course). This seems to be necessary for MS compilers.
             env.AppendUnique(LIBPATH = get_pythonlib_dir())
+    elif sys.platform == "darwin":
+        pyext = '.so' #env['LDMODULESUFFIX']
+	print pyext
+	# XXX: When those should be used ? (which version of Mac OS X ?)
+	LINKFLAGS += ' -undefined dynamic_lookup '
     else:
         pyext = env['SHLIBSUFFIX']
-    wrap = env.SharedLibrary(target, source, SHLIBPREFIX = '', 
-                             SHLIBSUFFIX = pyext, LINKFLAGS = LINKFLAGS, 
+    wrap = env.LoadableModule(target, source, SHLIBPREFIX = '', 
+                             LDMODULESUFFIX = pyext, LINKFLAGS = LINKFLAGS, 
                              CPPPATH = CPPPATH, *args, **kw)
     return wrap



More information about the Numpy-svn mailing list