summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-04-24 15:27:13 (GMT)
committerGeorg Brandl <georg@python.org>2007-04-24 15:27:13 (GMT)
commitfb4b3b77c713da09893cbc9ca525b78d0f1cb73e (patch)
tree757c274935d7ec408d994aba84eaac5e2e65c632 /Lib/distutils/command
parent18afb37845ddf22f64d8b8775b8a18c0489b63ca (diff)
downloadcpython-fb4b3b77c713da09893cbc9ca525b78d0f1cb73e.zip
cpython-fb4b3b77c713da09893cbc9ca525b78d0f1cb73e.tar.gz
cpython-fb4b3b77c713da09893cbc9ca525b78d0f1cb73e.tar.bz2
Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file
(as opposed to the command line) will now write file names ending in ".cpp" too.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/build_ext.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index 82474de..12d4083 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -533,7 +533,8 @@ class build_ext (Command):
if self.swig_cpp:
log.warn("--swig-cpp is deprecated - use --swig-opts=-c++")
- if self.swig_cpp or ('-c++' in self.swig_opts):
+ if self.swig_cpp or ('-c++' in self.swig_opts) or \
+ ('-c++' in extension.swig_opts):
target_ext = '.cpp'
else:
target_ext = '.c'