diff options
Diffstat (limited to 'numpy/distutils/command/scons.py')
-rw-r--r-- | numpy/distutils/command/scons.py | 7 |
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) |