summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-10-13 21:17:34 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-10-13 21:17:34 (GMT)
commit7f7327014c3225e43ddc43cee6b8505c5dd79cfa (patch)
treed6a5108e58ff95b59e9ab1c14e9acc63e7873b1d /Lib/distutils/command
parentff0d8a36befda1fbecf11d76921f9e34632c181b (diff)
downloadcpython-7f7327014c3225e43ddc43cee6b8505c5dd79cfa.zip
cpython-7f7327014c3225e43ddc43cee6b8505c5dd79cfa.tar.gz
cpython-7f7327014c3225e43ddc43cee6b8505c5dd79cfa.tar.bz2
complementary fix for #7115
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/build_ext.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index abc1584..8248089 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -628,8 +628,10 @@ class build_ext (Command):
The file is located in `build_lib` or directly in the package
(inplace option).
"""
- if os.sep in ext_name:
- ext_name = ext_name.replace(os.sep, '.')
+ # makes sure the extension name is only using dots
+ all_dots = string.maketrans('/'+os.sep, '..')
+ ext_name = ext_name.translate(all_dots)
+
fullname = self.get_ext_fullname(ext_name)
modpath = fullname.split('.')
filename = self.get_ext_filename(ext_name)