From 9436a75e4dfdae297c20be36ab3e65c5ab7ab1a4 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Fri, 5 Dec 2003 20:12:23 +0000 Subject: Compile the files in the same order they are passed to the compiler. Use case: Sometimes 'compiling' source files (with SWIG, for example) creates additionl files which included by later sources. The win32all setup script requires this. There is no SF item for this, but it was discussed on distutils-sig: http://mail.python.org/pipermail/distutils-sig/2003-November/003514.html --- Lib/distutils/bcppcompiler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Lib/distutils/bcppcompiler.py') diff --git a/Lib/distutils/bcppcompiler.py b/Lib/distutils/bcppcompiler.py index cfbe04ac01e..b0360a248ee 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) -- cgit v1.2.3