[Scipy-svn] r3972 - in branches/build_with_scons/scipy: . interpolate

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Mar 5 01:32:47 EST 2008


Author: cdavid
Date: 2008-03-05 00:32:32 -0600 (Wed, 05 Mar 2008)
New Revision: 3972

Added:
   branches/build_with_scons/scipy/interpolate/SConstruct
   branches/build_with_scons/scipy/interpolate/setupscons.py
Modified:
   branches/build_with_scons/scipy/setupscons.py
Log:
Interpolate now builds with scons.

Added: branches/build_with_scons/scipy/interpolate/SConstruct
===================================================================
--- branches/build_with_scons/scipy/interpolate/SConstruct	2008-03-05 06:17:13 UTC (rev 3971)
+++ branches/build_with_scons/scipy/interpolate/SConstruct	2008-03-05 06:32:32 UTC (rev 3972)
@@ -0,0 +1,32 @@
+# Last Change: Wed Mar 05 03:00 PM 2008 J
+# vim:syntax=python
+from os.path import join as pjoin
+
+from numpy.distutils.misc_util import get_numpy_include_dirs
+from numscons import GetNumpyEnvironment, CheckF77Clib
+
+env = GetNumpyEnvironment(ARGUMENTS)
+
+config = env.NumpyConfigure(custom_tests = {'CheckF77Clib' : CheckF77Clib})
+if not config.CheckF77Clib():
+    raise Exception("Could not check F77 runtime, needed for interpolate")
+config.Finish()
+
+env.AppendUnique(CPPPATH = get_numpy_include_dirs())
+env.AppendUnique(CPPPATH = env['F2PYINCLUDEDIR'])
+env.AppendUnique(LINKFLAGS = env['F77_LDFLAGS'])
+
+# Build fitpack
+src = [str(s) for s in env.Glob(pjoin('fitpack', '*.f'))]
+fitpack = env.NumpyStaticExtLibrary('fitpack', source = src)
+
+env.AppendUnique(LIBS = ['fitpack'])
+env.AppendUnique(LIBPATH = env['build_dir'])
+
+# Build _fitpack
+env.NumpyPythonExtension('_fitpack', source = '_fitpackmodule.c')
+
+# Build dfitpack
+dfitpack_wrap = env.F2py(pjoin(env['build_dir'], 'dfitpack'), 
+                         pjoin(env['build_dir'], 'fitpack.pyf')) 
+env.NumpyPythonExtension('dfitpack', source = dfitpack_wrap)

Copied: branches/build_with_scons/scipy/interpolate/setupscons.py (from rev 3969, branches/build_with_scons/scipy/interpolate/setup.py)
===================================================================
--- branches/build_with_scons/scipy/interpolate/setup.py	2008-03-05 02:13:58 UTC (rev 3969)
+++ branches/build_with_scons/scipy/interpolate/setupscons.py	2008-03-05 06:32:32 UTC (rev 3972)
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+from os.path import join
+
+def configuration(parent_package='',top_path=None):
+    from numpy.distutils.misc_util import Configuration
+
+    config = Configuration('interpolate', parent_package, top_path)
+
+    config.add_sconscript('SConstruct')
+    config.add_data_dir('tests')
+
+    return config
+
+if __name__ == '__main__':
+    from numpy.distutils.core import setup
+    setup(**configuration(top_path='').todict())

Modified: branches/build_with_scons/scipy/setupscons.py
===================================================================
--- branches/build_with_scons/scipy/setupscons.py	2008-03-05 06:17:13 UTC (rev 3971)
+++ branches/build_with_scons/scipy/setupscons.py	2008-03-05 06:32:32 UTC (rev 3972)
@@ -5,7 +5,7 @@
     config.add_subpackage('cluster')
     config.add_subpackage('fftpack')
     config.add_subpackage('integrate')
-    #config.add_subpackage('interpolate')
+    config.add_subpackage('interpolate')
     #config.add_subpackage('io')
     #config.add_subpackage('lib')
     #config.add_subpackage('linalg')




More information about the Scipy-svn mailing list