]> granicus.if.org Git - python/commitdiff
Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file
authorGeorg Brandl <georg@python.org>
Tue, 24 Apr 2007 15:27:25 +0000 (15:27 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 24 Apr 2007 15:27:25 +0000 (15:27 +0000)
(as opposed to the command line) will now write file names ending in
".cpp" too.
 (backport from rev. 54941)

Lib/distutils/command/build_ext.py
Misc/NEWS

index 82474de82307226aad55f914cc2b5d93735acb0d..12d4083743142f7d5760f8c6163a49f7b33b2a31 100644 (file)
@@ -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'
index 1d1ef105025f091761a8c5293c8c6d1d7fea7f30..e464714cd528bf732dcee3fb49b25c1e9e39e87a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,10 @@ What's New in Python 2.5.2c1?
 Library
 -------
 
+- 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.
+
 - Patch #1695229: Fix a regression with tarfile.open() and a missing name
   argument.