[Numpy-svn] r4508 - branches/numpy.scons/numpy/distutils/scons/core

numpy-svn@scip... numpy-svn@scip...
Mon Nov 26 00:29:05 CST 2007


Author: cdavid
Date: 2007-11-26 00:29:01 -0600 (Mon, 26 Nov 2007)
New Revision: 4508

Modified:
   branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py
Log:
Implement a NumpyGlob function to handle glob / BuildDir issues with scons

Modified: branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py	2007-11-26 05:37:46 UTC (rev 4507)
+++ branches/numpy.scons/numpy/distutils/scons/core/numpyenv.py	2007-11-26 06:29:01 UTC (rev 4508)
@@ -50,6 +50,13 @@
 
     return suncc.search(cnt)
 
+def _glob(env, path):
+    """glob function to handle src_dir issues."""
+    import glob
+    rdir = pdirname(path)
+    files = glob.glob(pjoin(env['src_dir'], path))
+    return [pjoin(rdir, pbasename(f)) for f in files]
+
 def is_f77_gnu(fullpath):
     # XXX: do this properly
     return pbasename(fullpath) == 'g77' or pbasename(fullpath) == 'gfortran'
@@ -301,6 +308,7 @@
                            conf_dir = pjoin(env['build_dir'], '.sconf'), 
                            log_file = pjoin(env['build_dir'], 'config.log'))
     env.NumpyConfigure = NumpyConfigure
+    env.NumpyGlob = curry(_glob, env)
 
     # XXX: Huge, ugly hack ! SConsign needs an absolute path or a path relative
     # to where the SConstruct file is. We have to find the path of the build



More information about the Numpy-svn mailing list