mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Remove pointless "vile hack" that can cause the build step to fail when some extension modules can't be imported.
See issue #5309 for the build failures, issue #458343 for the original motivation.
This commit is contained in:
parent
6b8e0ed562
commit
afa3153b27
2 changed files with 2 additions and 20 deletions
11
setup.py
11
setup.py
|
@ -381,17 +381,6 @@ class PyBuildExt(build_ext):
|
|||
os.remove(newname)
|
||||
os.rename(ext_filename, newname)
|
||||
|
||||
# XXX -- This relies on a Vile HACK in
|
||||
# distutils.command.build_ext.build_extension(). The
|
||||
# _built_objects attribute is stored there strictly for
|
||||
# use here.
|
||||
# If there is a failure, _built_objects may not be there,
|
||||
# so catch the AttributeError and move on.
|
||||
try:
|
||||
for filename in self._built_objects:
|
||||
os.remove(filename)
|
||||
except AttributeError:
|
||||
self.announce('unable to remove files (ignored)')
|
||||
except:
|
||||
exc_type, why, tb = sys.exc_info()
|
||||
self.announce('*** WARNING: importing extension "%s" '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue