From: Georg Brandl Date: Tue, 24 Apr 2007 15:27:13 +0000 (+0000) Subject: Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file X-Git-Tag: v2.6a1~1817 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb4b3b77c713da09893cbc9ca525b78d0f1cb73e;p=python 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. --- diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 82474de823..12d4083743 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' diff --git a/Misc/NEWS b/Misc/NEWS index 0fdf4a1d54..96d427cd8d 100644 --- 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.