[Scipy-svn] r3988 - branches/build_with_scons/scipy/sparse

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Mar 5 07:30:19 EST 2008


Author: cdavid
Date: 2008-03-05 06:30:12 -0600 (Wed, 05 Mar 2008)
New Revision: 3988

Added:
   branches/build_with_scons/scipy/sparse/SConstruct
   branches/build_with_scons/scipy/sparse/setupscons.py
Log:
sparse now builds with numscons...

Added: branches/build_with_scons/scipy/sparse/SConstruct
===================================================================
--- branches/build_with_scons/scipy/sparse/SConstruct	2008-03-05 12:22:33 UTC (rev 3987)
+++ branches/build_with_scons/scipy/sparse/SConstruct	2008-03-05 12:30:12 UTC (rev 3988)
@@ -0,0 +1,18 @@
+# Last Change: Wed Mar 05 09:00 PM 2008 J
+# vim:syntax=python
+from os.path import join
+
+from numpy.distutils.misc_util import get_numpy_include_dirs
+from numscons import GetNumpyEnvironment
+
+env = GetNumpyEnvironment(ARGUMENTS)
+
+env.AppendUnique(CPPPATH = get_numpy_include_dirs())
+
+env.NumpyPythonExtension('_sparsetools', 
+                         source = [join('sparsetools', 'sparsetools_wrap.cxx')])
+
+# Copy this python file into the distutils lib dir
+env.Command(join(env['distutils_installdir'], 'sparsetools.py'),
+            join(env['src_dir'], 'sparsetools', 'sparsetools.py'),
+            Copy('$TARGET', '$SOURCE'))

Copied: branches/build_with_scons/scipy/sparse/setupscons.py (from rev 3979, branches/build_with_scons/scipy/sparse/setup.py)
===================================================================
--- branches/build_with_scons/scipy/sparse/setup.py	2008-03-05 08:14:54 UTC (rev 3979)
+++ branches/build_with_scons/scipy/sparse/setupscons.py	2008-03-05 12:30:12 UTC (rev 3988)
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+from os.path import join
+import sys
+
+def configuration(parent_package='',top_path=None):
+    import numpy
+    from numpy.distutils.misc_util import Configuration
+
+    config = Configuration('sparse',parent_package,top_path, 
+                           setup_name = 'setupscons.py')
+
+    config.add_data_dir('tests')
+    config.add_sconscript('SConstruct')
+    config.add_subpackage('linalg')
+
+    return config
+
+if __name__ == '__main__':
+    from numpy.distutils.core import setup
+    setup(**configuration(top_path='').todict())




More information about the Scipy-svn mailing list