summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2002-01-18 20:30:53 (GMT)
committerThomas Heller <theller@ctypes.org>2002-01-18 20:30:53 (GMT)
commit5cba76df7bb38c5168a6133a4370e9673d5fd086 (patch)
treeac3154012d241af42aa26d5bcb8a12b04e6261f0 /Lib
parentba4fe77fbac32b1de85bc9943f7ce32d6fef63f2 (diff)
downloadcpython-5cba76df7bb38c5168a6133a4370e9673d5fd086.zip
cpython-5cba76df7bb38c5168a6133a4370e9673d5fd086.tar.gz
cpython-5cba76df7bb38c5168a6133a4370e9673d5fd086.tar.bz2
SWIGing a source file <name>.i silently overwrites <name>.c if it is
present - at least the swigged file should be named <name>_wrap.c as this is also SWIG's default. (Even better would be to generate the wrapped sources in a different location, but I'll leave this for later). Newer versions of SWIG don't accept the -dnone flag any more. Since virtually nobody uses SWIG with distutils, this should do no harm. Suggested be Martin Bless on c.l.p.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/command/build_ext.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index 7a39314..98617f7 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -511,7 +511,7 @@ class build_ext (Command):
for source in sources:
(base, ext) = os.path.splitext(source)
if ext == ".i": # SWIG interface file
- new_sources.append(base + target_ext)
+ new_sources.append(base + '_wrap' + target_ext)
swig_sources.append(source)
swig_targets[source] = new_sources[-1]
else:
@@ -521,7 +521,7 @@ class build_ext (Command):
return new_sources
swig = self.find_swig()
- swig_cmd = [swig, "-python", "-dnone", "-ISWIG"]
+ swig_cmd = [swig, "-python"]
if self.swig_cpp:
swig_cmd.append("-c++")