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

numpy-svn@scip... numpy-svn@scip...
Thu Sep 20 03:32:55 CDT 2007


Author: cdavid
Date: 2007-09-20 03:32:42 -0500 (Thu, 20 Sep 2007)
New Revision: 4055

Modified:
   branches/numpy.scons/
   branches/numpy.scons/numpy/distutils/misc_util.py
   branches/numpy.scons/numpy/setup.py
Log:
Add numpy.distutils command add_sconscript (does nothing, only hook)


Property changes on: branches/numpy.scons
___________________________________________________________________
Name: bzr:revision-info
   - timestamp: 2007-09-20 17:09:08.556999922 +0900
committer: david <david@david-laptop>
properties: 
	branch-nick: numpy.scons

   + timestamp: 2007-09-20 17:15:09.678999901 +0900
committer: david <david@david-laptop>
properties: 
	branch-nick: numpy.scons

Name: bzr:file-ids
   - numpy/distutils/command/scons.py	scons.py-20070920080716-xuge6qwroc9z4jhc-1

   + 
Name: bzr:revision-id:v3-trunk0
   - 3737 david@david-laptop-20070920080908-n8pj8vmszdir3zoa

   + 3737 david@david-laptop-20070920080908-n8pj8vmszdir3zoa
3738 david@david-laptop-20070920081509-58kkojgmml3t7jxs


Modified: branches/numpy.scons/numpy/distutils/misc_util.py
===================================================================
--- branches/numpy.scons/numpy/distutils/misc_util.py	2007-09-20 08:32:14 UTC (rev 4054)
+++ branches/numpy.scons/numpy/distutils/misc_util.py	2007-09-20 08:32:42 UTC (rev 4055)
@@ -575,7 +575,7 @@
 class Configuration(object):
 
     _list_keys = ['packages', 'ext_modules', 'data_files', 'include_dirs',
-                  'libraries', 'headers', 'scripts', 'py_modules']
+                  'libraries', 'headers', 'scripts', 'py_modules', 'scons_scripts']
     _dict_keys = ['package_dir']
     _extra_keys = ['name', 'version']
 
@@ -1166,6 +1166,27 @@
             self.warn('distutils distribution has been initialized,'\
                       ' it may be too late to add a library '+ name)
 
+    def add_sconscript(self, sconscript,
+                       subpackage_path=None,
+                       standalone = False):
+        """Add a list of sconscript to configuration.
+        """
+        #print "%s: adding %s" % (__file__, sconscript)
+        if standalone:
+            parent_name = None
+        else:
+            parent_name = self.name
+
+        dist = self.get_distribution()
+        fullsconsname = self.paths(sconscript)
+        
+        if dist is not None:
+            dist.scons_scripts.extend(fullsconsname)
+            self.warn('distutils distribution has been initialized,'\
+                      ' it may be too late to add a subpackage '+ subpackage_name)
+        else:
+            self.scons_scripts.extend(fullsconsname)
+
     def add_scripts(self,*files):
         """Add scripts to configuration.
         """

Modified: branches/numpy.scons/numpy/setup.py
===================================================================
--- branches/numpy.scons/numpy/setup.py	2007-09-20 08:32:14 UTC (rev 4054)
+++ branches/numpy.scons/numpy/setup.py	2007-09-20 08:32:42 UTC (rev 4055)
@@ -4,6 +4,7 @@
     from numpy.distutils.misc_util import Configuration
     config = Configuration('numpy',parent_package,top_path)
     config.add_subpackage('distutils')
+    config.add_subpackage('scons_fake')
     config.add_subpackage('testing')
     config.add_subpackage('f2py')
     config.add_subpackage('core')



More information about the Numpy-svn mailing list