summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-03-25 14:20:09 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-03-25 14:20:09 (GMT)
commit03ffbcd393319cfd34341974829fd010fad4b053 (patch)
treec9dfe9fd75e83e6ad407750cfb52ec1c429e220d /setup.py
parent8c077227f217478af580c6d11d484746cea8c63c (diff)
downloadcpython-03ffbcd393319cfd34341974829fd010fad4b053.zip
cpython-03ffbcd393319cfd34341974829fd010fad4b053.tar.gz
cpython-03ffbcd393319cfd34341974829fd010fad4b053.tar.bz2
Fix SF # 532618 517704, install problems when building modules fail.
Fix whitespace on a line also.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index cc423c5..e10981e 100644
--- a/setup.py
+++ b/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'],