diff options
author | Greg Ward <gward@python.net> | 2000-06-25 02:10:46 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-06-25 02:10:46 (GMT) |
commit | 5ca84b83c766de8a836ae0a9fff5777b6299613b (patch) | |
tree | 995a326dcd2230d3b512af9861c962cfbdcfbfd1 /Lib/distutils/command | |
parent | bb7baa793dc8dbfa00ee6253dd61c35457736fb8 (diff) | |
download | cpython-5ca84b83c766de8a836ae0a9fff5777b6299613b.zip cpython-5ca84b83c766de8a836ae0a9fff5777b6299613b.tar.gz cpython-5ca84b83c766de8a836ae0a9fff5777b6299613b.tar.bz2 |
Fixed a few silly bugs in my SWIG support code. (Hey, I said it was
experimental and untested.)
Call 'customize_compiler()' after getting CCompiler object.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/build_ext.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 6b7ec74..f8df87a 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -12,6 +12,7 @@ import sys, os, string, re from types import * from distutils.core import Command from distutils.errors import * +from distutils.sysconfig import customize_compiler from distutils.dep_util import newer_group from distutils.extension import Extension @@ -191,6 +192,7 @@ class build_ext (Command): verbose=self.verbose, dry_run=self.dry_run, force=self.force) + customize_compiler(self.compiler) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in @@ -453,14 +455,14 @@ class build_ext (Command): for source in sources: (base, ext) = os.path.splitext(source) - if ext in self.swig_ext(): + if ext == ".i": # SWIG interface file new_sources.append(base + ".c") # umm, what if it's C++? - swig_files.append(source) + swig_sources.append(source) swig_targets[source] = new_sources[-1] else: new_sources.append(source) - if not swig_files: + if not swig_sources: return new_sources swig = self.find_swig() |