File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -188,8 +188,13 @@ def build_extension(self, ext):
188188 # distutils.command.build_ext.build_extension(). The
189189 # _built_objects attribute is stored there strictly for
190190 # use here.
191- for filename in self ._built_objects :
192- os .remove (filename )
191+ # If there is a failure, _built_objects may not be there,
192+ # so catch the AttributeError and move on.
193+ try :
194+ for filename in self ._built_objects :
195+ os .remove (filename )
196+ except AttributeError :
197+ self .announce ('unable to remove files (ignored)' )
193198 else :
194199 self .announce ('*** WARNING: importing extension "%s" '
195200 'failed: %s' % (ext .name , why ))
@@ -605,7 +610,7 @@ def detect_modules(self):
605610 # procedure triggers on.
606611 frameworkdir = sysconfig .get_config_var ('PYTHONFRAMEWORKDIR' )
607612 exts .append ( Extension ('gestalt' , ['gestaltmodule.c' ],
608- extra_link_args = ['-framework' , 'Carbon' ]) )
613+ extra_link_args = ['-framework' , 'Carbon' ]) )
609614 exts .append ( Extension ('MacOS' , ['macosmodule.c' ],
610615 extra_link_args = ['-framework' , 'Carbon' ]) )
611616 exts .append ( Extension ('icglue' , ['icgluemodule.c' ],
You can’t perform that action at this time.
0 commit comments