diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-07-03 08:37:27 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-07-03 08:37:27 (GMT) |
commit | 385029fda08514cb08d4ec95a508ab0233c4438c (patch) | |
tree | b0be3107a0c2f32011b8d188b562b861415eb81e /Lib/distutils/command | |
parent | 7e077243095e0f91c5627f9e6e7cd395846edb46 (diff) | |
download | cpython-385029fda08514cb08d4ec95a508ab0233c4438c.zip cpython-385029fda08514cb08d4ec95a508ab0233c4438c.tar.gz cpython-385029fda08514cb08d4ec95a508ab0233c4438c.tar.bz2 |
Merged revisions 73792 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r73792 | tarek.ziade | 2009-07-03 10:33:28 +0200 (Fri, 03 Jul 2009) | 9 lines
Merged revisions 73790 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r73790 | tarek.ziade | 2009-07-03 10:22:56 +0200 (Fri, 03 Jul 2009) | 1 line
Fixed #6403 : package path usage for build_ext
........
................
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/build_ext.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 57a110b..3045702 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -631,17 +631,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): |