summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/scons.py
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-06-12 08:59:20 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-06-12 08:59:20 +0000
commit9ed41fefbe4721c362fd46fb078a80730705a06d (patch)
tree762229794bfe419c6944a547a7e87d14d3ddff11 /numpy/distutils/command/scons.py
parent95a9befc62b54d33a918c1dbc8b130ae8dcba433 (diff)
downloadnumpy-9ed41fefbe4721c362fd46fb078a80730705a06d.tar.gz
When src_dir is not null, takes it into account to retrieve distutils libdir.
Diffstat (limited to 'numpy/distutils/command/scons.py')
-rw-r--r--numpy/distutils/command/scons.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/numpy/distutils/command/scons.py b/numpy/distutils/command/scons.py
index 05b5de0cc..4bf556a0d 100644
--- a/numpy/distutils/command/scons.py
+++ b/numpy/distutils/command/scons.py
@@ -38,11 +38,11 @@ def get_scons_local_path():
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 @@ class scons(old_build_ext):
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)