mirror of
https://github.com/python/cpython.git
synced 2025-09-24 01:13:22 +00:00
Added an execution layer to be able to customize per-extension
building.
This commit is contained in:
parent
d30e587e00
commit
49c994239f
1 changed files with 80 additions and 79 deletions
|
@ -356,13 +356,16 @@ class build_ext (Command):
|
||||||
|
|
||||||
# get_outputs ()
|
# get_outputs ()
|
||||||
|
|
||||||
|
def build_extensions(self):
|
||||||
def build_extensions (self):
|
|
||||||
|
|
||||||
# First, sanity-check the 'extensions' list
|
# First, sanity-check the 'extensions' list
|
||||||
self.check_extensions_list(self.extensions)
|
self.check_extensions_list(self.extensions)
|
||||||
|
|
||||||
for ext in self.extensions:
|
for ext in self.extensions:
|
||||||
|
self.build_extension(ext)
|
||||||
|
|
||||||
|
def build_extension(self, ext):
|
||||||
|
|
||||||
sources = ext.sources
|
sources = ext.sources
|
||||||
if sources is None or type(sources) not in (ListType, TupleType):
|
if sources is None or type(sources) not in (ListType, TupleType):
|
||||||
raise DistutilsSetupError, \
|
raise DistutilsSetupError, \
|
||||||
|
@ -391,7 +394,7 @@ class build_ext (Command):
|
||||||
if not (self.force or newer_group(sources, ext_filename, 'newer')):
|
if not (self.force or newer_group(sources, ext_filename, 'newer')):
|
||||||
self.announce("skipping '%s' extension (up-to-date)" %
|
self.announce("skipping '%s' extension (up-to-date)" %
|
||||||
ext.name)
|
ext.name)
|
||||||
continue # 'for' loop over all extensions
|
return
|
||||||
else:
|
else:
|
||||||
self.announce("building '%s' extension" % ext.name)
|
self.announce("building '%s' extension" % ext.name)
|
||||||
|
|
||||||
|
@ -453,8 +456,6 @@ class build_ext (Command):
|
||||||
debug=self.debug,
|
debug=self.debug,
|
||||||
build_temp=self.build_temp)
|
build_temp=self.build_temp)
|
||||||
|
|
||||||
# build_extensions ()
|
|
||||||
|
|
||||||
|
|
||||||
def swig_sources (self, sources):
|
def swig_sources (self, sources):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue