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

numpy-svn@scip... numpy-svn@scip...
Sun Sep 7 02:16:32 CDT 2008


Author: cdavid
Date: 2008-09-07 02:16:28 -0500 (Sun, 07 Sep 2008)
New Revision: 5793

Modified:
   trunk/numpy/distutils/command/scons.py
Log:
scons command: fix one more issue related to build dir.

The distutils installation directory relative to the scons build directory was
not always computed right. The relative position on the fs does not depend on
the source directory (in out-of-place builds), but on the package *name*
translated to a directly only.



Modified: trunk/numpy/distutils/command/scons.py
===================================================================
--- trunk/numpy/distutils/command/scons.py	2008-09-06 10:48:38 UTC (rev 5792)
+++ trunk/numpy/distutils/command/scons.py	2008-09-07 07:16:28 UTC (rev 5793)
@@ -44,11 +44,12 @@
     from numscons import get_scons_path
     return get_scons_path()
 
-def get_distutils_libdir(cmd, sconscript_path):
+def get_distutils_libdir(cmd, pkg):
     """Returns the path where distutils install libraries, relatively to the
     scons build directory."""
     from numscons import get_scons_build_dir
-    scdir = pjoin(get_scons_build_dir(), pdirname(sconscript_path))
+    from numscons.core.utils import pkg_to_path
+    scdir = pjoin(get_scons_build_dir(), pkg_to_path(pkg))
     n = scdir.count(os.sep)
     return pjoin(os.sep.join([os.pardir for i in range(n+1)]), cmd.build_lib)
 
@@ -424,7 +425,7 @@
                 #cmd.append('distutils_libdir=%s' % protect_path(pjoin(self.build_lib,
                 #                                                    pdirname(sconscript))))
                 cmd.append('distutils_libdir=%s' %
-                             protect_path(get_distutils_libdir(self, sconscript)))
+                             protect_path(get_distutils_libdir(self, pkg_name)))
 
                 if not self._bypass_distutils_cc:
                     cmd.append('cc_opt=%s' % self.scons_compiler)



More information about the Numpy-svn mailing list