[Numpy-svn] r4416 - branches/numpy.scons/numpy/distutils/scons/core

numpy-svn@scip... numpy-svn@scip...
Thu Nov 8 02:55:38 CST 2007


Author: cdavid
Date: 2007-11-08 02:55:31 -0600 (Thu, 08 Nov 2007)
New Revision: 4416

Modified:
   branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py
Log:
Use g++ for linking with mingw to keep compatible with numpy.distutils

Modified: branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py	2007-11-08 08:54:02 UTC (rev 4415)
+++ branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py	2007-11-08 08:55:31 UTC (rev 4416)
@@ -90,6 +90,7 @@
     from SCons.Environment import Environment
     from SCons.Tool import Tool, FindTool, FindAllTools
     from SCons.Script import BuildDir, Help
+    from SCons.Errors import EnvironmentError
 
     # XXX: I would prefer subclassing Environment, because we really expect
     # some different behaviour than just Environment instances...
@@ -204,6 +205,12 @@
         for i in [DEF_LINKERS, DEF_CXX_COMPILERS, DEF_ASSEMBLERS, DEF_ARS]:
             t = FindTool(i, env) or i[0]
             Tool(t)(env)
+    else:
+        try:
+	    t = FindTool(['g++'], env)
+	    env['LINK'] = t
+	except EnvironmentError:
+	    raise RuntimeError('g++ not found: this is necessary with mingw32 to build numpy !') 
 			
     for t in FindAllTools(DEF_OTHER_TOOLS, env):
         Tool(t)(env)
@@ -214,6 +221,7 @@
         pass
 
     # Adding custom builder
+    # XXX: Put them into tools ?
     env['BUILDERS']['NumpySharedLibrary'] = NumpySharedLibrary
     env['BUILDERS']['NumpyCtypes'] = NumpyCtypes
     env['BUILDERS']['PythonExtension'] = PythonExtension



More information about the Numpy-svn mailing list