From: Georg Brandl Date: Tue, 24 Apr 2007 15:27:25 +0000 (+0000) Subject: Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file X-Git-Tag: v2.5.2c1~335 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f784d91215ae32c11309cab0b2ab2f11ae286140;p=thirdparty%2FPython%2Fcpython.git 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. (backport from rev. 54941) --- diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 82474de82307..12d408374314 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 1d1ef105025f..e464714cd528 100644 --- 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.