Commit bce5b313 authored by Jeremy Hylton's avatar Jeremy Hylton

Extend dependency tracking so that .o files are rebuilt.

Two new tests are needed:

Don't skip building an extension if any of the depends files are newer
than the target.

Pass ext.depends to compiler.compile() so that it can track individual
files.
parent f2a11eb3
...@@ -388,7 +388,6 @@ class build_ext (Command): ...@@ -388,7 +388,6 @@ 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)
...@@ -396,7 +395,6 @@ class build_ext (Command): ...@@ -396,7 +395,6 @@ class build_ext (Command):
self.build_extension(ext) self.build_extension(ext)
def build_extension(self, 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, \
...@@ -421,7 +419,6 @@ class build_ext (Command): ...@@ -421,7 +419,6 @@ class build_ext (Command):
else: else:
ext_filename = os.path.join(self.build_lib, ext_filename = os.path.join(self.build_lib,
self.get_ext_filename(fullname)) self.get_ext_filename(fullname))
depends = sources + ext.depends depends = sources + ext.depends
if not (self.force or newer_group(depends, ext_filename, 'newer')): if not (self.force or newer_group(depends, ext_filename, 'newer')):
log.debug("skipping '%s' extension (up-to-date)", ext.name) log.debug("skipping '%s' extension (up-to-date)", ext.name)
...@@ -467,7 +464,8 @@ class build_ext (Command): ...@@ -467,7 +464,8 @@ class build_ext (Command):
macros=macros, macros=macros,
include_dirs=ext.include_dirs, include_dirs=ext.include_dirs,
debug=self.debug, debug=self.debug,
extra_postargs=extra_args) extra_postargs=extra_args,
depends=ext.depends)
# XXX -- this is a Vile HACK! # XXX -- this is a Vile HACK!
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment