[Numpy-svn] r4642 - branches/distutils_scons_command/numpy/distutils/command

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Dec 26 01:21:28 EST 2007


Author: cdavid
Date: 2007-12-26 00:21:17 -0600 (Wed, 26 Dec 2007)
New Revision: 4642

Modified:
   branches/distutils_scons_command/numpy/distutils/command/scons.py
Log:
Use separate numscons package instead of internal local copy

Modified: branches/distutils_scons_command/numpy/distutils/command/scons.py
===================================================================
--- branches/distutils_scons_command/numpy/distutils/command/scons.py	2007-12-24 16:44:31 UTC (rev 4641)
+++ branches/distutils_scons_command/numpy/distutils/command/scons.py	2007-12-26 06:21:17 UTC (rev 4642)
@@ -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