Commit afa3153b authored by Antoine Pitrou's avatar Antoine Pitrou

Remove pointless "vile hack" that can cause the build step to fail when some...

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.
parent 6b8e0ed5
...@@ -545,15 +545,8 @@ class build_ext(Command): ...@@ -545,15 +545,8 @@ class build_ext(Command):
extra_postargs=extra_args, extra_postargs=extra_args,
depends=ext.depends) depends=ext.depends)
# XXX -- this is a Vile HACK! # XXX outdated variable, kept here in case third-part code
# # needs it.
# The setup.py script for Python on Unix needs to be able to
# get this list so it can perform all the clean up needed to
# avoid keeping object files around when cleaning out a failed
# build of an extension module. Since Distutils does not
# track dependencies, we have to get rid of intermediates to
# ensure all the intermediates will be properly re-built.
#
self._built_objects = objects[:] self._built_objects = objects[:]
# Now link the object files together into a "shared object" -- # Now link the object files together into a "shared object" --
......
...@@ -381,17 +381,6 @@ class PyBuildExt(build_ext): ...@@ -381,17 +381,6 @@ class PyBuildExt(build_ext):
os.remove(newname) os.remove(newname)
os.rename(ext_filename, 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: except:
exc_type, why, tb = sys.exc_info() exc_type, why, tb = sys.exc_info()
self.announce('*** WARNING: importing extension "%s" ' self.announce('*** WARNING: importing extension "%s" '
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment