[Numpy-svn] r4251 - in branches/numpy.scons/numpy: distutils/scons scons_fake/hook

numpy-svn@scip... numpy-svn@scip...
Thu Oct 18 22:20:10 CDT 2007


Author: cdavid
Date: 2007-10-18 22:20:02 -0500 (Thu, 18 Oct 2007)
New Revision: 4251

Added:
   branches/numpy.scons/numpy/scons_fake/hook/SConstruct
   branches/numpy.scons/numpy/scons_fake/hook/hello.c
Modified:
   branches/numpy.scons/numpy/distutils/scons/numpyenv.py
Log:
Avoid sconscript wo target in examples

Modified: branches/numpy.scons/numpy/distutils/scons/numpyenv.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/numpyenv.py	2007-10-19 02:39:25 UTC (rev 4250)
+++ branches/numpy.scons/numpy/distutils/scons/numpyenv.py	2007-10-19 03:20:02 UTC (rev 4251)
@@ -135,16 +135,17 @@
     from utils import curry
     NumpyConfigure = curry(env.Configure, conf_dir = pjoin(env['build_dir'], '.sconf'))
     env.NumpyConfigure = NumpyConfigure
-    # XXX: Huge, ungly hack ! SConsign needs an absolute path or a path
+    # 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 dir relative to the src_dir: we add n .., where n is the number
     # of occureant of the path separator in the src dir.
     def get_build_relative_src(srcdir, builddir):
         n = srcdir.count(os.sep) + 1
-        return pjoin(os.sep.join([r'..' for i in range(n)]), builddir)
-    env.SConsignFile(pjoin(get_build_relative_src(env['src_dir'], 
-                                                  env['build_dir']),
-                           '.sconsign.dblite'))
+        return pjoin(os.sep.join([os.pardir for i in range(n)]), builddir)
+    sconsign = pjoin(get_build_relative_src(env['src_dir'], 
+                                            env['build_dir']),
+                     '.sconsign.dblite')
+    env.SConsignFile(sconsign)
 
     # ========================================================================
     # Adding default tools for the one we do not customize: mingw is special

Added: branches/numpy.scons/numpy/scons_fake/hook/SConstruct
===================================================================
--- branches/numpy.scons/numpy/scons_fake/hook/SConstruct	2007-10-19 02:39:25 UTC (rev 4250)
+++ branches/numpy.scons/numpy/scons_fake/hook/SConstruct	2007-10-19 03:20:02 UTC (rev 4251)
@@ -0,0 +1,5 @@
+# vim:syntax=python
+from numpy.distutils.scons import GetNumpyEnvironment
+
+env = GetNumpyEnvironment(ARGUMENTS)
+env.NumpySharedLibrary('hello', 'hello.c')

Added: branches/numpy.scons/numpy/scons_fake/hook/hello.c
===================================================================
--- branches/numpy.scons/numpy/scons_fake/hook/hello.c	2007-10-19 02:39:25 UTC (rev 4250)
+++ branches/numpy.scons/numpy/scons_fake/hook/hello.c	2007-10-19 03:20:02 UTC (rev 4251)
@@ -0,0 +1,4 @@
+int hello()
+{
+        return 0;
+}



More information about the Numpy-svn mailing list