diff options
author | Greg Ward <gward@python.net> | 1999-09-21 18:36:15 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 1999-09-21 18:36:15 (GMT) |
commit | b116e45a29bfb6cecae92f58e75e10838bac765f (patch) | |
tree | 77becbba6a12de007daba19d872f583cae514f20 /Lib/distutils/unixccompiler.py | |
parent | fbf8affca1a5eb139e794ae91c14ae6ccef2fc19 (diff) | |
download | cpython-b116e45a29bfb6cecae92f58e75e10838bac765f.zip cpython-b116e45a29bfb6cecae92f58e75e10838bac765f.tar.gz cpython-b116e45a29bfb6cecae92f58e75e10838bac765f.tar.bz2 |
In 'link_shared_object()', try to be less sensitive to missing input files
in dry-run mode.
Diffstat (limited to 'Lib/distutils/unixccompiler.py')
-rw-r--r-- | Lib/distutils/unixccompiler.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py index 0149313..02fbc66 100644 --- a/Lib/distutils/unixccompiler.py +++ b/Lib/distutils/unixccompiler.py @@ -202,7 +202,17 @@ class UnixCCompiler (CCompiler): # If any of the input object files are newer than the output shared # object, relink. Again, this is a simplistic dependency check: # doesn't look at any of the libraries we might be linking with. - if newer_group (objects, output_filename): + # Note that we have to dance around errors comparing timestamps if + # we're in dry-run mode (yuck). + try: + newer = newer_group (objects, output_filename) + except OSError: + if self.dry_run: + newer = 1 + else: + raise + + if newer: ld_args = self.ldflags_shared + lib_opts + \ objects + ['-o', output_filename] |