summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/build_ext.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-06-29 16:13:39 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-06-29 16:13:39 (GMT)
commit3fbcc60eb859b00f4310e028da0ba6edba35f7c8 (patch)
tree6c5e572d2d25899c28ee53e8249d5b9fcc47e123 /Lib/distutils/command/build_ext.py
parent5c3dd9a1ee959d7e85e9b1ab541687dba8f7d095 (diff)
downloadcpython-3fbcc60eb859b00f4310e028da0ba6edba35f7c8.zip
cpython-3fbcc60eb859b00f4310e028da0ba6edba35f7c8.tar.gz
cpython-3fbcc60eb859b00f4310e028da0ba6edba35f7c8.tar.bz2
Fixed 6365: wrong inplace location for build_ext if the extension had dots
Diffstat (limited to 'Lib/distutils/command/build_ext.py')
-rw-r--r--Lib/distutils/command/build_ext.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index 293c214..c2c1bf1 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -643,16 +643,16 @@ class build_ext (Command):
(inplace option).
"""
fullname = self.get_ext_fullname(ext_name)
- filename = self.get_ext_filename(fullname)
+ modpath = fullname.split('.')
+ package = '.'.join(modpath[0:-1])
+ base = modpath[-1]
+ filename = self.get_ext_filename(base)
if not self.inplace:
# no further work needed
return os.path.join(self.build_lib, filename)
# the inplace option requires to find the package directory
# using the build_py command
- modpath = fullname.split('.')
- package = '.'.join(modpath[0:-1])
- base = modpath[-1]
build_py = self.get_finalized_command('build_py')
package_dir = os.path.abspath(build_py.get_package_dir(package))
return os.path.join(package_dir, filename)