mirror of
https://github.com/python/cpython.git
synced 2024-11-24 18:34:43 +08:00
Changes to what we do to modules that don't import, as
discussed on python-dev.
This commit is contained in:
parent
dcea37026e
commit
7113d9607b
10
setup.py
10
setup.py
@ -176,13 +176,13 @@ class PyBuildExt(build_ext):
|
||||
except ImportError, why:
|
||||
|
||||
if 1:
|
||||
self.announce('*** WARNING: removing "%s" since importing it'
|
||||
self.announce('*** WARNING: renaming "%s" since importing it'
|
||||
' failed: %s' % (ext.name, why))
|
||||
assert not self.inplace
|
||||
fullname = self.get_ext_fullname(ext.name)
|
||||
ext_filename = os.path.join(self.build_lib,
|
||||
self.get_ext_filename(fullname))
|
||||
os.remove(ext_filename)
|
||||
basename, tail = os.path.splitext(ext_filename)
|
||||
newname = basename + "_failed" + tail
|
||||
if os.path.exists(newname): os.remove(newname)
|
||||
os.rename(ext_filename, newname)
|
||||
|
||||
# XXX -- This relies on a Vile HACK in
|
||||
# distutils.command.build_ext.build_extension(). The
|
||||
|
Loading…
Reference in New Issue
Block a user