[Numpy-svn] r5581 - in trunk/numpy: core distutils

numpy-svn@scip... numpy-svn@scip...
Thu Jul 31 11:07:08 CDT 2008


Author: cdavid
Date: 2008-07-31 11:07:04 -0500 (Thu, 31 Jul 2008)
New Revision: 5581

Modified:
   trunk/numpy/core/setupscons.py
   trunk/numpy/distutils/misc_util.py
Log:
Change API for pre/post hooks: they should be able to take arbitrary arguments.

Modified: trunk/numpy/core/setupscons.py
===================================================================
--- trunk/numpy/core/setupscons.py	2008-07-31 16:03:32 UTC (rev 5580)
+++ trunk/numpy/core/setupscons.py	2008-07-31 16:07:04 UTC (rev 5581)
@@ -76,7 +76,7 @@
         config.add_data_files((header_dir, h_file),
                               (header_dir, t_file))
 
-    def add_generated_files():
+    def add_generated_files(*args, **kw):
         add_config_header()
         add_numpyconfig_header()
         add_array_api()

Modified: trunk/numpy/distutils/misc_util.py
===================================================================
--- trunk/numpy/distutils/misc_util.py	2008-07-31 16:03:32 UTC (rev 5580)
+++ trunk/numpy/distutils/misc_util.py	2008-07-31 16:07:04 UTC (rev 5581)
@@ -1188,7 +1188,8 @@
         """Add a sconscript to configuration.
 
         pre_hook and post hook should be sequences of callable, which will be
-        use before and after executing scons. 
+        use before and after executing scons. The callable should be defined as
+        callable(*args, **kw). It is ugly, but well, hooks are ugly anyway...
         
         sconscript can be None, which can be useful to add only post/pre
         hooks."""



More information about the Numpy-svn mailing list