summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-07-03 08:22:56 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-07-03 08:22:56 (GMT)
commit65ec61ed06d7b28da05fa834c65ffa7c13005d2b (patch)
tree009b2d4b93e911214dc6c10da8902800de49eff3 /Lib/distutils/command
parent50a225285179e3ddb6729fef83826f294b660823 (diff)
downloadcpython-65ec61ed06d7b28da05fa834c65ffa7c13005d2b.zip
cpython-65ec61ed06d7b28da05fa834c65ffa7c13005d2b.tar.gz
cpython-65ec61ed06d7b28da05fa834c65ffa7c13005d2b.tar.bz2
Fixed #6403 : package path usage for build_ext
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/build_ext.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index c2c1bf1..96bd68b 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -644,17 +644,23 @@ class build_ext (Command):
"""
fullname = self.get_ext_fullname(ext_name)
modpath = fullname.split('.')
- package = '.'.join(modpath[0:-1])
- base = modpath[-1]
- filename = self.get_ext_filename(base)
+ filename = self.get_ext_filename(modpath[-1])
+
if not self.inplace:
# no further work needed
+ # returning :
+ # build_dir/package/path/filename
+ filename = os.path.join(*modpath[:-1]+[filename])
return os.path.join(self.build_lib, filename)
# the inplace option requires to find the package directory
- # using the build_py command
+ # using the build_py command for that
+ package = '.'.join(modpath[0:-1])
build_py = self.get_finalized_command('build_py')
package_dir = os.path.abspath(build_py.get_package_dir(package))
+
+ # returning
+ # package_dir/filename
return os.path.join(package_dir, filename)
def get_ext_fullname(self, ext_name):