]> 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:13 +0000 (15:27 +0000)
committerGeorg Brandl <georg@python.org>
Tue, 24 Apr 2007 15:27:13 +0000 (15:27 +0000)
(as opposed to the command line) will now write file names ending in
".cpp" too.

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 0fdf4a1d54954aded8d703744f936b9a42f700fa..96d427cd8d6697034c95b51a9b3f3f572391368e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -209,6 +209,10 @@ Core and builtins
 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.
+
 - As specified in RFC 2616, an HTTP response like 2xx indicates that
   the client's request was successfully received, understood, and accepted.
   Now in these cases no error is raised in urllib2.