[Scipy-svn] r3578 - in branches/scipy.scons/scipy/linsolve: . umfpack

scipy-svn@scip... scipy-svn@scip...
Sat Nov 24 03:00:51 CST 2007


Author: cdavid
Date: 2007-11-24 02:57:38 -0600 (Sat, 24 Nov 2007)
New Revision: 3578

Added:
   branches/scipy.scons/scipy/linsolve/SConstruct
   branches/scipy.scons/scipy/linsolve/setupscons.py
   branches/scipy.scons/scipy/linsolve/umfpack/setupscons.py
Log:
linsolve now builds with scons (umfpack wrapper not done yet)

Copied: branches/scipy.scons/scipy/linsolve/SConstruct (from rev 3567, branches/scipy.scons/scipy/integrate/SConstruct)
===================================================================
--- branches/scipy.scons/scipy/integrate/SConstruct	2007-11-22 12:38:12 UTC (rev 3567)
+++ branches/scipy.scons/scipy/linsolve/SConstruct	2007-11-24 08:57:38 UTC (rev 3578)
@@ -0,0 +1,48 @@
+# Last Change: Sat Nov 24 05: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
+
+from numpy.distutils.scons import CheckF77LAPACK
+
+env = GetNumpyEnvironment(ARGUMENTS)
+
+env.AppendUnique(CPPPATH = get_numpy_include_dirs())
+env.AppendUnique(CPPPATH = env['F2PYINCLUDEDIR'])
+
+if sys.platform=='win32':
+    superlu_defs = [('NO_TIMER',1)]
+else:
+    superlu_defs = []
+
+# Build superlu 
+src = glob.glob(pjoin('SuperLU', 'SRC', '*.c'))
+superlu = env.NumpyStaticExtLibrary('superlu_src', source = src, 
+                                    CPPDEFINES = superlu_defs)
+
+env.AppendUnique(LIBS = ['superlu_src'])
+env.AppendUnique(LIBPATH = env['build_dir'])
+
+# Build common objects files
+com_env = env.Copy()
+com_env.AppendUnique(CPPPATH = get_python_inc())
+com_src = [pjoin(env['build_dir'], i) for i in ['_superlu_utils.c', \
+                                                '_superluobject.c']]
+com_objs = com_env.SharedObject(source = com_src)
+
+# Build _zsuperlu
+env.NumpyPythonExtension('_zsuperlu', source = ['_zsuperlumodule.c'] + com_objs)
+
+# Build _csuperlu
+env.NumpyPythonExtension('_csuperlu', source = ['_csuperlumodule.c'] + com_objs)
+
+# Build _dsuperlu
+env.NumpyPythonExtension('_dsuperlu', source = ['_dsuperlumodule.c'] + com_objs)
+
+# Build _ssuperlu
+env.NumpyPythonExtension('_ssuperlu', source = ['_ssuperlumodule.c'] + com_objs)

Copied: branches/scipy.scons/scipy/linsolve/setupscons.py (from rev 3567, branches/scipy.scons/scipy/linsolve/setup.py)
===================================================================
--- branches/scipy.scons/scipy/linsolve/setup.py	2007-11-22 12:38:12 UTC (rev 3567)
+++ branches/scipy.scons/scipy/linsolve/setupscons.py	2007-11-24 08:57:38 UTC (rev 3578)
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+from os.path import join
+import sys
+
+def configuration(parent_package='',top_path=None):
+    from numpy.distutils.misc_util import Configuration
+    from numpy.distutils.system_info import get_info
+
+    config = Configuration('linsolve',parent_package,top_path, 
+                           setup_name = 'setupscons.py')
+    config.add_sconscript('SConstruct')
+    config.add_subpackage('umfpack')
+
+    return config
+
+if __name__ == '__main__':
+    from numpy.distutils.core import setup
+    setup(**configuration(top_path='').todict())

Copied: branches/scipy.scons/scipy/linsolve/umfpack/setupscons.py (from rev 3567, branches/scipy.scons/scipy/linsolve/umfpack/setup.py)
===================================================================
--- branches/scipy.scons/scipy/linsolve/umfpack/setup.py	2007-11-22 12:38:12 UTC (rev 3567)
+++ branches/scipy.scons/scipy/linsolve/umfpack/setupscons.py	2007-11-24 08:57:38 UTC (rev 3578)
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+# 05.12.2005, c
+# last change: 27.03.2006
+def configuration(parent_package='',top_path=None):
+    import numpy
+    from numpy.distutils.misc_util import Configuration
+    from numpy.distutils.system_info import get_info, dict_append
+
+    config = Configuration( 'umfpack', parent_package, top_path )
+    config.add_data_dir('tests')
+
+#    umf_info = get_info( 'umfpack', notfound_action = 1 )
+#
+#    umfpack_i_file = config.paths('umfpack.i')[0]
+#    def umfpack_i(ext, build_dir):
+#        if umf_info:
+#            return umfpack_i_file
+#
+#    blas_info = get_info('blas_opt')
+#    build_info = {}
+#    dict_append(build_info, **umf_info)
+#    dict_append(build_info, **blas_info)
+#
+#    config.add_extension( '__umfpack',
+#                          sources = [umfpack_i],
+#                          depends = ['umfpack.i'],
+#                          **build_info)
+
+    return config
+
+if __name__ == "__main__":
+    from numpy.distutils.core import setup
+    setup(**configuration(top_path='').todict())



More information about the Scipy-svn mailing list