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

numpy-svn@scip... numpy-svn@scip...
Wed Aug 25 06:23:07 CDT 2010


Author: pearu
Date: 2010-08-25 06:23:07 -0500 (Wed, 25 Aug 2010)
New Revision: 8664

Modified:
   trunk/numpy/distutils/command/__init__.py
   trunk/numpy/distutils/command/build_py.py
Log:
Fix bug to ensure that swig generated .py files are installed.

Modified: trunk/numpy/distutils/command/__init__.py
===================================================================
--- trunk/numpy/distutils/command/__init__.py	2010-08-25 08:41:58 UTC (rev 8663)
+++ trunk/numpy/distutils/command/__init__.py	2010-08-25 11:23:07 UTC (rev 8664)
@@ -5,7 +5,7 @@
 
 __revision__ = "$Id: __init__.py,v 1.3 2005/05/16 11:08:49 pearu Exp $"
 
-distutils_all = [  'build_py',
+distutils_all = [  #'build_py',
                    'clean',
                    'install_clib',
                    'install_scripts',
@@ -20,6 +20,7 @@
            'config_compiler',
            'config',
            'build_src',
+           'build_py',
            'build_ext',
            'build_clib',
            'build_scripts',

Modified: trunk/numpy/distutils/command/build_py.py
===================================================================
--- trunk/numpy/distutils/command/build_py.py	2010-08-25 08:41:58 UTC (rev 8663)
+++ trunk/numpy/distutils/command/build_py.py	2010-08-25 11:23:07 UTC (rev 8664)
@@ -4,6 +4,12 @@
 
 class build_py(old_build_py):
 
+    def run(self):
+        build_src = self.get_finalized_command('build_src')
+        if build_src.py_modules_dict and self.packages is None:
+            self.packages = build_src.py_modules_dict.keys ()
+        old_build_py.run(self)
+
     def find_package_modules(self, package, package_dir):
         modules = old_build_py.find_package_modules(self, package, package_dir)
 
@@ -19,6 +25,7 @@
         self.py_modules[:] = new_py_modules
         modules = old_build_py.find_modules(self)
         self.py_modules[:] = old_py_modules
+
         return modules
 
     # XXX: Fix find_source_files for item in py_modules such that item is 3-tuple



More information about the Numpy-svn mailing list