Mercurial > cpython-lru_cache-weakref
diff Lib/distutils/command/build_ext.py @ 23824:8ff691dc7f29 legacy-trunk
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.
| author | Jeremy Hylton <jeremy@alum.mit.edu> |
|---|---|
| date | Thu, 13 Jun 2002 17:32:20 +0000 |
| parents | 7dd432e1de26 |
| children | 921064c26297 |
line wrap: on
line diff
--- a/Lib/distutils/command/build_ext.py Thu Jun 13 17:28:18 2002 +0000 +++ b/Lib/distutils/command/build_ext.py Thu Jun 13 17:32:20 2002 +0000 @@ -388,7 +388,6 @@ # get_outputs () def build_extensions(self): - # First, sanity-check the 'extensions' list self.check_extensions_list(self.extensions) @@ -396,7 +395,6 @@ self.build_extension(ext) def build_extension(self, ext): - sources = ext.sources if sources is None or type(sources) not in (ListType, TupleType): raise DistutilsSetupError, \ @@ -421,7 +419,6 @@ else: ext_filename = os.path.join(self.build_lib, self.get_ext_filename(fullname)) - depends = sources + ext.depends if not (self.force or newer_group(depends, ext_filename, 'newer')): log.debug("skipping '%s' extension (up-to-date)", ext.name) @@ -467,7 +464,8 @@ macros=macros, include_dirs=ext.include_dirs, debug=self.debug, - extra_postargs=extra_args) + extra_postargs=extra_args, + depends=ext.depends) # XXX -- this is a Vile HACK! #
