[Scipy-svn] r3585 - branches/scipy.scons/scipy/special

scipy-svn@scip... scipy-svn@scip...
Sat Nov 24 05:38:08 CST 2007


Author: cdavid
Date: 2007-11-24 05:37:53 -0600 (Sat, 24 Nov 2007)
New Revision: 3585

Added:
   branches/scipy.scons/scipy/special/SConstruct
   branches/scipy.scons/scipy/special/setupscons.py
Log:
special now build with scons

Copied: branches/scipy.scons/scipy/special/SConstruct (from rev 3582, branches/scipy.scons/scipy/integrate/SConstruct)
===================================================================
--- branches/scipy.scons/scipy/integrate/SConstruct	2007-11-24 10:49:51 UTC (rev 3582)
+++ branches/scipy.scons/scipy/special/SConstruct	2007-11-24 11:37:53 UTC (rev 3585)
@@ -0,0 +1,50 @@
+# Last Change: Sat Nov 24 08:00 PM 2007 J
+# vim:syntax=python
+from os.path import join as pjoin
+import glob
+import sys
+from distutils.sysconfig import get_python_inc
+
+from numpy.distutils.misc_util import get_numpy_include_dirs
+from numpy.distutils.scons import GetNumpyEnvironment
+
+env = GetNumpyEnvironment(ARGUMENTS)
+
+env.AppendUnique(CPPPATH = [get_python_inc(), get_numpy_include_dirs()])
+env.AppendUnique(CPPPATH = env['F2PYINCLUDEDIR'])
+
+if sys.platform=='win32':
+#        define_macros.append(('NOINFINITIES',None))
+#        define_macros.append(('NONANS',None))
+    env.AppendUnique(CPPDEFINES = '_USE_MATH_DEFINES')
+
+def build_lib(name, ext):
+    """ext should be .f or .c"""
+    src = glob.glob(pjoin(name, '*%s' % ext))
+    env.NumpyStaticExtLibrary(name, source = src)
+
+# C libraries
+build_lib('c_misc', '.c')
+build_lib('cephes', '.c')
+
+# F libraries
+build_lib('mach', '.f')
+build_lib('toms', '.f')
+build_lib('amos', '.f')
+build_lib('cdf', '.f')
+build_lib('specfun', '.f')
+
+env.AppendUnique(LIBPATH = env['build_dir'])
+
+# Cephes extension
+src = ['_cephesmodule.c', 'amos_wrappers.c', 'specfun_wrappers.c', \
+       'toms_wrappers.c','cdf_wrappers.c','ufunc_extras.c']
+
+env.NumpyPythonExtension('_cephes', 
+                         source = src, 
+                         LIBS = ['amos', 'toms', 'c_misc', 'cephes', 'mach',\
+                                 'cdf', 'specfun'])
+
+# Specfun extension
+env.NumpyPythonExtension('specfun', source = 'specfun.pyf', LIBS = 'specfun', \
+                         F2PYOPTIONS = ["--no-wrap-functions"])

Copied: branches/scipy.scons/scipy/special/setupscons.py (from rev 3582, branches/scipy.scons/scipy/special/setup.py)
===================================================================
--- branches/scipy.scons/scipy/special/setup.py	2007-11-24 10:49:51 UTC (rev 3582)
+++ branches/scipy.scons/scipy/special/setupscons.py	2007-11-24 11:37:53 UTC (rev 3585)
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+import os
+import sys
+from os.path import join
+from distutils.sysconfig import get_python_inc
+
+def configuration(parent_package='',top_path=None):
+    from numpy.distutils.misc_util import Configuration
+    config = Configuration('special', 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())



More information about the Scipy-svn mailing list