diff options
-rw-r--r-- | Lib/distutils/bcppcompiler.py | 6 | ||||
-rw-r--r-- | Lib/distutils/ccompiler.py | 6 | ||||
-rw-r--r-- | Lib/distutils/msvccompiler.py | 6 |
3 files changed, 15 insertions, 3 deletions
diff --git a/Lib/distutils/bcppcompiler.py b/Lib/distutils/bcppcompiler.py index cfbe04a..b0360a2 100644 --- a/Lib/distutils/bcppcompiler.py +++ b/Lib/distutils/bcppcompiler.py @@ -96,7 +96,11 @@ class BCPPCompiler(CCompiler) : else: compile_opts.extend (self.compile_options) - for obj, (src, ext) in build.items(): + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue # XXX why do the normpath here? src = os.path.normpath(src) obj = os.path.normpath(obj) diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py index 751ec06..ebd93c2 100644 --- a/Lib/distutils/ccompiler.py +++ b/Lib/distutils/ccompiler.py @@ -691,7 +691,11 @@ class CCompiler: depends, extra_postargs) cc_args = self._get_cc_args(pp_opts, debug, extra_preargs) - for obj, (src, ext) in build.items(): + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) # Return *all* object filenames, not just the ones we just built. diff --git a/Lib/distutils/msvccompiler.py b/Lib/distutils/msvccompiler.py index 27fb658..1441ea0 100644 --- a/Lib/distutils/msvccompiler.py +++ b/Lib/distutils/msvccompiler.py @@ -291,7 +291,11 @@ class MSVCCompiler (CCompiler) : else: compile_opts.extend(self.compile_options) - for obj, (src, ext) in build.items(): + for obj in objects: + try: + src, ext = build[obj] + except KeyError: + continue if debug: # pass the full pathname to MSVC in debug mode, # this allows the debugger to find the source file |