[Numpy-svn] r4684 - branches/build_with_scons/numpy/distutils/command

numpy-svn@scip... numpy-svn@scip...
Sun Jan 6 04:42:29 CST 2008


Author: cdavid
Date: 2008-01-06 04:42:26 -0600 (Sun, 06 Jan 2008)
New Revision: 4684

Modified:
   branches/build_with_scons/numpy/distutils/command/scons.py
Log:

Use separate numscons package instead of internal local copy



Modified: branches/build_with_scons/numpy/distutils/command/scons.py
===================================================================
--- branches/build_with_scons/numpy/distutils/command/scons.py	2008-01-06 10:35:44 UTC (rev 4683)
+++ branches/build_with_scons/numpy/distutils/command/scons.py	2008-01-06 10:42:26 UTC (rev 4684)
@@ -32,8 +32,8 @@
 
 def get_scons_local_path():
     """This returns the full path where scons.py for scons-local is located."""
-    import numpy.distutils
-    return pjoin(pdirname(numpy.distutils.__file__), 'scons-local')
+    from numscons import get_scons_path
+    return get_scons_path()
 
 def get_python_exec_invoc():
     """This returns the python executable from which this file is invocated."""
@@ -263,6 +263,13 @@
             #print self.cxxcompiler.compiler_cxx[0]
 
     def run(self):
+        if len(self.sconscripts) > 0:
+            try:
+                import numscons
+            except ImportError, e:
+                raise RuntimeError("importing numscons failed (error was %s), using " \
+                                   "scons within distutils is not possible without "
+                                   "this package " % str(e))
         # XXX: when a scons script is missing, scons only prints warnings, and
         # does not return a failure (status is 0). We have to detect this from
         # distutils (this cannot work for recursive scons builds...)



More information about the Numpy-svn mailing list