[Numpy-svn] r8662 - trunk/numpy/distutils/command

numpy-svn@scip... numpy-svn@scip...
Wed Aug 25 02:22:41 CDT 2010


Author: pearu
Date: 2010-08-25 02:22:40 -0500 (Wed, 25 Aug 2010)
New Revision: 8662

Modified:
   trunk/numpy/distutils/command/build_src.py
Log:
Make extension swig_opts effective to build_src command.

Modified: trunk/numpy/distutils/command/build_src.py
===================================================================
--- trunk/numpy/distutils/command/build_src.py	2010-08-22 05:37:21 UTC (rev 8661)
+++ trunk/numpy/distutils/command/build_src.py	2010-08-25 07:22:40 UTC (rev 8662)
@@ -640,9 +640,13 @@
         target_dirs = []
         py_files = []     # swig generated .py files
         target_ext = '.c'
-        if self.swig_cpp:
+        if '-c++' in extension.swig_opts:
             typ = 'c++'
             is_cpp = True
+            extension.swig_opts.remove('-c++')
+        elif self.swig_cpp:
+            typ = 'c++'
+            is_cpp = True
         else:
             typ = None
             is_cpp = False
@@ -716,7 +720,7 @@
             self.mkpath(d)
 
         swig = self.swig or self.find_swig()
-        swig_cmd = [swig, "-python"]
+        swig_cmd = [swig, "-python"] + extension.swig_opts
         if is_cpp:
             swig_cmd.append('-c++')
         for d in extension.include_dirs:



More information about the Numpy-svn mailing list