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

numpy-svn@scip... numpy-svn@scip...
Thu Jun 12 03:59:26 CDT 2008


Author: cdavid
Date: 2008-06-12 03:59:20 -0500 (Thu, 12 Jun 2008)
New Revision: 5273

Modified:
   trunk/numpy/distutils/command/scons.py
Log:
When src_dir is not null, takes it into account to retrieve distutils libdir.

Modified: trunk/numpy/distutils/command/scons.py
===================================================================
--- trunk/numpy/distutils/command/scons.py	2008-06-12 07:43:27 UTC (rev 5272)
+++ trunk/numpy/distutils/command/scons.py	2008-06-12 08:59:20 UTC (rev 5273)
@@ -38,11 +38,11 @@
     from numscons import get_scons_path
     return get_scons_path()
 
-def get_distutils_libdir(cmd):
+def get_distutils_libdir(cmd, sconscript_path):
     """Returns the path where distutils install libraries, relatively to the
     scons build directory."""
     from numscons import get_scons_build_dir
-    scdir = get_scons_build_dir()
+    scdir = pjoin(get_scons_build_dir(), pdirname(sconscript_path))
     n = scdir.count(os.sep)
     return pjoin(os.sep.join([os.pardir for i in range(n+1)]), cmd.build_lib)
 
@@ -369,7 +369,8 @@
             cmd.append('pkg_name="%s"' % pkg_name)
             #cmd.append('distutils_libdir=%s' % protect_path(pjoin(self.build_lib,
             #                                                    pdirname(sconscript))))
-            cmd.append('distutils_libdir=%s' % protect_path(get_distutils_libdir(self)))
+            cmd.append('distutils_libdir=%s' % 
+                         protect_path(get_distutils_libdir(self, sconscript)))
 
             if not self._bypass_distutils_cc:
                 cmd.append('cc_opt=%s' % self.scons_compiler)



More information about the Numpy-svn mailing list