[Numpy-svn] r4702 - branches/build_with_scons/numpy/linalg

numpy-svn@scip... numpy-svn@scip...
Sun Jan 6 20:48:35 CST 2008


Author: cdavid
Date: 2008-01-06 20:48:27 -0600 (Sun, 06 Jan 2008)
New Revision: 4702

Added:
   branches/build_with_scons/numpy/linalg/SConstruct
   branches/build_with_scons/numpy/linalg/setupscons.py
Log:
numpy.linalg now builds with scons

Added: branches/build_with_scons/numpy/linalg/SConstruct
===================================================================
--- branches/build_with_scons/numpy/linalg/SConstruct	2008-01-07 02:47:36 UTC (rev 4701)
+++ branches/build_with_scons/numpy/linalg/SConstruct	2008-01-07 02:48:27 UTC (rev 4702)
@@ -0,0 +1,33 @@
+# Last Change: Fri Nov 16 05:00 PM 2007 J
+# vim:syntax=python
+import os.path
+
+import __builtin__
+__builtin__.__NUMPY_SETUP__ = True
+
+from numpy.distutils.misc_util import get_numpy_include_dirs, get_mathlibs
+from numscons import GetNumpyEnvironment, scons_get_paths, \
+                     scons_get_mathlib
+from numscons import CheckF77LAPACK
+from numscons.configuration import write_info
+
+env = GetNumpyEnvironment(ARGUMENTS)
+env.Append(CPPPATH = scons_get_paths(env['include_bootstrap']))
+
+config = env.NumpyConfigure(custom_tests = 
+    {'CheckLAPACK' : CheckF77LAPACK})
+
+use_lapack = config.CheckLAPACK()
+
+mlib = scons_get_mathlib(env)
+env.AppendUnique(LIBS = mlib)
+
+config.Finish()
+write_info(env)
+
+sources = ['lapack_litemodule.c']
+if not use_lapack:
+    sources.extend(['zlapack_lite.c', 'dlapack_lite.c', 'blas_lite.c',
+                    'dlamch.c', 'f2c_lite.c'])
+lapack_lite = env.NumpyPythonExtension('lapack_lite', source = sources)
+            

Added: branches/build_with_scons/numpy/linalg/setupscons.py
===================================================================
--- branches/build_with_scons/numpy/linalg/setupscons.py	2008-01-07 02:47:36 UTC (rev 4701)
+++ branches/build_with_scons/numpy/linalg/setupscons.py	2008-01-07 02:48:27 UTC (rev 4702)
@@ -0,0 +1,20 @@
+
+def configuration(parent_package='',top_path=None):
+    from numpy.distutils.misc_util import Configuration
+    from numpy.distutils.system_info import get_info
+    config = Configuration('linalg',parent_package,top_path)
+
+    config.add_data_dir('tests')
+
+    config.add_sconscript('SConstruct', 
+                          source_files = ['lapack_litemodule.c',
+                                          'zlapack_lite.c', 'dlapack_lite.c',
+                                          'blas_lite.c', 'dlamch.c',
+                                          'f2c_lite.c','f2c.h'],
+                          post_hook = config.add_configres)
+
+    return config
+
+if __name__ == '__main__':
+    from numpy.distutils.core import setup
+    setup(configuration=configuration)



More information about the Numpy-svn mailing list