mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#5583 Added optional Extensions in Distutils
This commit is contained in:
parent
42f9b4e5b4
commit
9e47ce49a0
5 changed files with 40 additions and 2 deletions
|
@ -476,7 +476,13 @@ class build_ext (Command):
|
|||
self.check_extensions_list(self.extensions)
|
||||
|
||||
for ext in self.extensions:
|
||||
self.build_extension(ext)
|
||||
try:
|
||||
self.build_extension(ext)
|
||||
except (CCompilerError, DistutilsError), e:
|
||||
if not ext.optional:
|
||||
raise
|
||||
self.warn('building extension "%s" failed: %s' %
|
||||
(ext.name, e))
|
||||
|
||||
def build_extension(self, ext):
|
||||
sources = ext.sources
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue