mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
Fix SF # 532618 517704, install problems when building modules fail.
Fix whitespace on a line also.
This commit is contained in:
parent
8c077227f2
commit
03ffbcd393
1 changed files with 8 additions and 3 deletions
11
setup.py
11
setup.py
|
@ -188,8 +188,13 @@ class PyBuildExt(build_ext):
|
|||
# distutils.command.build_ext.build_extension(). The
|
||||
# _built_objects attribute is stored there strictly for
|
||||
# use here.
|
||||
for filename in self._built_objects:
|
||||
os.remove(filename)
|
||||
# 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)')
|
||||
else:
|
||||
self.announce('*** WARNING: importing extension "%s" '
|
||||
'failed: %s' % (ext.name, why))
|
||||
|
@ -605,7 +610,7 @@ class PyBuildExt(build_ext):
|
|||
# procedure triggers on.
|
||||
frameworkdir = sysconfig.get_config_var('PYTHONFRAMEWORKDIR')
|
||||
exts.append( Extension('gestalt', ['gestaltmodule.c'],
|
||||
extra_link_args=['-framework', 'Carbon']) )
|
||||
extra_link_args=['-framework', 'Carbon']) )
|
||||
exts.append( Extension('MacOS', ['macosmodule.c'],
|
||||
extra_link_args=['-framework', 'Carbon']) )
|
||||
exts.append( Extension('icglue', ['icgluemodule.c'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue