summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-06-13 17:32:20 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2002-06-13 17:32:20 (GMT)
commitc18fde5d82981cc1f6e18ccdc3ab5a4d333856fb (patch)
tree96b70d4ba03ae810bedf7da6e0ba85b0bbd522d7 /Lib/distutils
parent1bba31d9a2dd24824a36b7e02cab7a9502587269 (diff)
downloadcpython-c18fde5d82981cc1f6e18ccdc3ab5a4d333856fb.zip
cpython-c18fde5d82981cc1f6e18ccdc3ab5a4d333856fb.tar.gz
cpython-c18fde5d82981cc1f6e18ccdc3ab5a4d333856fb.tar.bz2
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.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/command/build_ext.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index 21dd0dc..943f30a 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -388,7 +388,6 @@ class build_ext (Command):
# get_outputs ()
def build_extensions(self):
-
# First, sanity-check the 'extensions' list
self.check_extensions_list(self.extensions)
@@ -396,7 +395,6 @@ class build_ext (Command):
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 @@ class build_ext (Command):
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 @@ class build_ext (Command):
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!
#