[Numpy-svn] r4351 - in branches/numpy.scons/numpy/distutils: . command

numpy-svn@scip... numpy-svn@scip...
Tue Oct 30 02:32:51 CDT 2007


Author: cdavid
Date: 2007-10-30 02:32:46 -0500 (Tue, 30 Oct 2007)
New Revision: 4351

Modified:
   branches/numpy.scons/numpy/distutils/command/sdist.py
   branches/numpy.scons/numpy/distutils/misc_util.py
   branches/numpy.scons/numpy/distutils/numpy_distribution.py
Log:
implement source_files arguments of Configuration.add_sconscript

Modified: branches/numpy.scons/numpy/distutils/command/sdist.py
===================================================================
--- branches/numpy.scons/numpy/distutils/command/sdist.py	2007-10-30 07:13:30 UTC (rev 4350)
+++ branches/numpy.scons/numpy/distutils/command/sdist.py	2007-10-30 07:32:46 UTC (rev 4351)
@@ -25,6 +25,16 @@
             self.filelist.extend(headers)
 
         if dist.has_scons_scripts():
+            # Add SConscripts files
             self.filelist.extend(dist.get_scons_scripts())
+            
+            # Add related sources files added through source_files argument of
+            # Configuration.add_sconscript
+            scons_sources = []
+            for pkg_sources in dist.get_scons_sources():
+                if pkg_sources:
+                    scons_sources.extend(pkg_sources)
 
+            self.filelist.extend(scons_sources)
+
         return

Modified: branches/numpy.scons/numpy/distutils/misc_util.py
===================================================================
--- branches/numpy.scons/numpy/distutils/misc_util.py	2007-10-30 07:13:30 UTC (rev 4350)
+++ branches/numpy.scons/numpy/distutils/misc_util.py	2007-10-30 07:32:46 UTC (rev 4351)
@@ -1189,21 +1189,22 @@
         # Convert the sconscript name to a relative filename (relative from top
         # setup.py's directory)
         fullsconsname = self.paths(sconscript)[0]
+        full_source_files = []
         if source_files:
-            full_source_files = [self.paths(i)[0] for i in source_files]
+            full_source_files.extend([self.paths(i)[0] for i in source_files])
 
         if dist is not None:
             dist.scons_data.append((fullsconsname, 
                                     pre_hook, 
                                     post_hook,
-                                    source_files))
+                                    full_source_files))
             self.warn('distutils distribution has been initialized,'\
                       ' it may be too late to add a subpackage '+ subpackage_name)
         else:
             self.scons_data.append((fullsconsname, 
                                     pre_hook, 
                                     post_hook,
-                                    source_files))
+                                    full_source_files))
 
     def add_scripts(self,*files):
         """Add scripts to configuration.

Modified: branches/numpy.scons/numpy/distutils/numpy_distribution.py
===================================================================
--- branches/numpy.scons/numpy/distutils/numpy_distribution.py	2007-10-30 07:13:30 UTC (rev 4350)
+++ branches/numpy.scons/numpy/distutils/numpy_distribution.py	2007-10-30 07:32:46 UTC (rev 4351)
@@ -13,7 +13,6 @@
         return bool(self.scons_data)
 
     def get_scons_scripts(self):
-        print self.scons_data
         return [i[0] for i in self.scons_data]
 
     def get_scons_pre_hooks(self):



More information about the Numpy-svn mailing list