[Numpy-svn] r5794 - branches/1.2.x/numpy/distutils/command

numpy-svn@scip... numpy-svn@scip...
Sun Sep 7 02:19:24 CDT 2008


Author: cdavid
Date: 2008-09-07 02:19:21 -0500 (Sun, 07 Sep 2008)
New Revision: 5794

Modified:
   branches/1.2.x/numpy/distutils/command/scons.py
Log:
Backport r5793 for scons command.

Modified: branches/1.2.x/numpy/distutils/command/scons.py
===================================================================
--- branches/1.2.x/numpy/distutils/command/scons.py	2008-09-07 07:16:28 UTC (rev 5793)
+++ branches/1.2.x/numpy/distutils/command/scons.py	2008-09-07 07:19:21 UTC (rev 5794)
@@ -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