[Numpy-svn] r5578 - trunk/numpy/distutils/command

numpy-svn@scip... numpy-svn@scip...
Thu Jul 31 09:27:02 CDT 2008


Author: cdavid
Date: 2008-07-31 09:26:58 -0500 (Thu, 31 Jul 2008)
New Revision: 5578

Modified:
   trunk/numpy/distutils/command/scons.py
Log:
Handle inplace build option for numscons.

Modified: trunk/numpy/distutils/command/scons.py
===================================================================
--- trunk/numpy/distutils/command/scons.py	2008-07-31 14:12:52 UTC (rev 5577)
+++ trunk/numpy/distutils/command/scons.py	2008-07-31 14:26:58 UTC (rev 5578)
@@ -238,6 +238,7 @@
     user_options = old_build_ext.user_options + \
             [('jobs=', None,
               "specify number of worker threads when executing scons"),
+             ('inplace', 'i', 'If specified, build in place.'),
              ('scons-tool-path=', None, 'specify additional path '\
                                     '(absolute) to look for scons tools'),
              ('silent=', None, 'specify whether scons output should less verbose'\
@@ -262,6 +263,7 @@
         self.scons_fcompiler = None
 
         self.package_list = None
+        self.inplace = 0
 
         # Only critical things
         self.log_level = 50
@@ -401,13 +403,15 @@
             cmd = [scons_exec, "-f", sconscript, '-I.']
             if self.jobs:
                 cmd.append(" --jobs=%d" % int(self.jobs))
+            if self.inplace:
+                cmd.append("inplace=1")
             cmd.append('scons_tool_path="%s"' % self.scons_tool_path)
             cmd.append('src_dir="%s"' % pdirname(sconscript))
             cmd.append('pkg_name="%s"' % pkg_name)
             cmd.append('log_level=%s' % self.log_level)
             #cmd.append('distutils_libdir=%s' % protect_path(pjoin(self.build_lib,
             #                                                    pdirname(sconscript))))
-            cmd.append('distutils_libdir=%s' % 
+            cmd.append('distutils_libdir=%s' %
                          protect_path(get_distutils_libdir(self, sconscript)))
 
             if not self._bypass_distutils_cc:



More information about the Numpy-svn mailing list