[Numpy-svn] r4358 - in branches/numpy.scons: . numpy/core numpy/distutils/scons numpy/distutils/scons/checkers numpy/scons_fake/checkers

numpy-svn@scip... numpy-svn@scip...
Tue Oct 30 05:39:46 CDT 2007


Author: cdavid
Date: 2007-10-30 05:39:36 -0500 (Tue, 30 Oct 2007)
New Revision: 4358

Modified:
   branches/numpy.scons/numpy/core/SConstruct
   branches/numpy.scons/numpy/distutils/scons/__init__.py
   branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py
   branches/numpy.scons/numpy/scons_fake/checkers/SConstruct
   branches/numpy.scons/testsdist.sh
Log:
More scons checkers refactoring

Modified: branches/numpy.scons/numpy/core/SConstruct
===================================================================
--- branches/numpy.scons/numpy/core/SConstruct	2007-10-30 09:48:53 UTC (rev 4357)
+++ branches/numpy.scons/numpy/core/SConstruct	2007-10-30 10:39:36 UTC (rev 4358)
@@ -1,4 +1,4 @@
-# Last Change: Mon Oct 29 07:00 PM 2007 J
+# Last Change: Tue Oct 30 07:00 PM 2007 J
 # vim:syntax=python
 import os
 import sys
@@ -8,7 +8,7 @@
 from numpy.distutils.scons import get_python_inc, get_pythonlib_dir
 from numpy.distutils.scons import GetNumpyEnvironment
 from numpy.distutils.scons import NumpyCheckLib
-from numpy.distutils.scons import CheckCBLAS, CheckMKL, CheckATLAS, CheckGenericBLAS, CheckGenericLAPACK
+from numpy.distutils.scons import CheckCBLAS 
 from numpy.distutils.scons.configuration import write_info
 
 from scons_support import CheckBrokenMathlib, define_no_smp, \
@@ -30,8 +30,6 @@
 config = env.NumpyConfigure(custom_tests = {'CheckBrokenMathlib' : CheckBrokenMathlib,
     'CheckMathlib' : CheckMathlib, 
     'CheckCBLAS' : CheckCBLAS, 
-    'CheckGenericBLAS' : CheckGenericBLAS, 
-    'CheckGenericLAPACK' : CheckGenericLAPACK, 
     'NumpyCheckLib' : NumpyCheckLib})
 
 # Convention: list of tuples (definition, value). value:

Modified: branches/numpy.scons/numpy/distutils/scons/__init__.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/__init__.py	2007-10-30 09:48:53 UTC (rev 4357)
+++ branches/numpy.scons/numpy/distutils/scons/__init__.py	2007-10-30 10:39:36 UTC (rev 4358)
@@ -1,9 +1,7 @@
 from numpyenv import GetNumpyEnvironment, GetNumpyOptions
 from libinfo_scons import NumpyCheckLib
 from libinfo import get_paths as scons_get_paths
-from checkers.custom_checkers import CheckMKL, CheckATLAS, CheckCBLAS, \
-        CheckAccelerate, CheckMKL, CheckSunperf, CheckLAPACK, \
-        CheckGenericBLAS, CheckGenericLAPACK
+from checkers import CheckCBLAS, CheckLAPACK
 from extension import get_python_inc, get_pythonlib_dir
 from utils import isstring
 from fortran_scons import CheckF77Verbose, CheckF77Clib, CheckF77Mangling

Modified: branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py	2007-10-30 09:48:53 UTC (rev 4357)
+++ branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py	2007-10-30 10:39:36 UTC (rev 4358)
@@ -1,5 +1,5 @@
 #! /usr/bin/env python
-# Last Change: Tue Oct 30 05:00 PM 2007 J
+# Last Change: Tue Oct 30 07:00 PM 2007 J
 
 # Module for custom, common checkers for numpy (and scipy)
 import sys
@@ -14,6 +14,9 @@
 
 from numpy.distutils.scons.configuration import opt_info, add_info
 
+from perflib import CheckMKL, CheckATLAS, CheckSunperf, CheckAccelerate
+from support import check_include_and_run
+
 def CheckCBLAS(context, autoadd = 1):
     env = context.env
 
@@ -25,7 +28,7 @@
         headers = ['cblas.h']
         linkflags = []
         cflags = []
-        st = _check_include_and_run(context, 'CBLAS', [], headers, cblas_src,
+        st = check_include_and_run(context, 'CBLAS', [], headers, cblas_src,
                                       libs, libpath, linkflags, cflags, autoadd)
         if st:
             add_info(env, 'cblas', opt_info('cblas', site = 1))
@@ -93,7 +96,7 @@
                 fdict['LIBS'].extend(context.env['LIBS'])
             if env.has_key('LIBPATH'):
                 fdict['LIBPATH'].extend(context.env['LIBPATH'])
-            st =_check_include_and_run(context, 'LAPACK (MKL)', [], [],
+            st = check_include_and_run(context, 'LAPACK (MKL)', [], [],
                     test_src, fdict['LIBS'], fdict['LIBPATH'], [], [], autoadd = 1)
             add_info(env, 'lapack', opt_info('mkl'))
             return st
@@ -107,7 +110,7 @@
                 fdict['LIBS'].extend(context.env['LIBS'])
             if env.has_key('LIBPATH'):
                 fdict['LIBPATH'].extend(context.env['LIBPATH'])
-            st =_check_include_and_run(context, 'LAPACK (ATLAS)', [], [],
+            st = check_include_and_run(context, 'LAPACK (ATLAS)', [], [],
                     test_src, fdict['LIBS'], fdict['LIBPATH'], [], [], autoadd = 1)
             add_info(env, 'lapack', opt_info('atlas'))
             # XXX: Check complete LAPACK or not

Modified: branches/numpy.scons/numpy/scons_fake/checkers/SConstruct
===================================================================
--- branches/numpy.scons/numpy/scons_fake/checkers/SConstruct	2007-10-30 09:48:53 UTC (rev 4357)
+++ branches/numpy.scons/numpy/scons_fake/checkers/SConstruct	2007-10-30 10:39:36 UTC (rev 4358)
@@ -1,26 +1,33 @@
 # vim:syntax=python
-from numpy.distutils.scons import GetNumpyEnvironment, CheckATLAS, \
-                                  CheckAccelerate, CheckMKL, CheckCBLAS, \
-				  CheckSunperf
+from numpy.distutils.scons import GetNumpyEnvironment
+from numpy.distutils.scons.checkers.perflib import \
+        CheckATLAS, CheckAccelerate, CheckMKL, CheckSunperf
 
 env = GetNumpyEnvironment(ARGUMENTS)
 
+import os
+try:
+    os.environ['DEBUG_SCONS_CHECK']
+    do_check = 1
+except KeyError:
+    do_check = 0
+
 config = env.NumpyConfigure(custom_tests = 
     {'CheckATLAS' : CheckATLAS,
     'CheckMKL' : CheckMKL,
     'CheckAccelerate' : CheckAccelerate,
-    'CheckSunperf' : CheckSunperf,
-    'CheckCBLAS' : CheckCBLAS})
+    'CheckSunperf' : CheckSunperf})
 
-#config.CheckATLAS(autoadd = 0)
-#config.CheckMKL(autoadd = 0)
-#config.CheckAccelerate(autoadd = 0)
-#config.CheckSunperf(autoadd = 0)
-#config.CheckCBLAS(autoadd = 0)
+if do_check:
+    config.CheckATLAS(autoadd = 0)
+    config.CheckMKL(autoadd = 0)
+    config.CheckAccelerate(autoadd = 0)
+    config.CheckSunperf(autoadd = 0)
 
+    if env.has_key('LIBS'):
+        print env.Dump('LIBS')
+    else:
+        print "No LIBS in env"
+
 config.Finish()
 
-if env.has_key('LIBS'):
-    print env.Dump('LIBS')
-else:
-    print "No LIBS in env"

Modified: branches/numpy.scons/testsdist.sh
===================================================================
--- branches/numpy.scons/testsdist.sh	2007-10-30 09:48:53 UTC (rev 4357)
+++ branches/numpy.scons/testsdist.sh	2007-10-30 10:39:36 UTC (rev 4358)
@@ -1,8 +1,9 @@
 PREFIX=$PWD
-SVNVER=4346
+SVNVER=` svn info | grep Revision | tr -d \ | cut -d: -f 2`
 rm -rf $PREFIX/build
 rm -rf $PREFIX/dist
 python setup.py sdist
 (cd $PREFIX/dist && tar -xzf numpy-1.0.4.dev$SVNVER.tar.gz)
-(cd $PREFIX/dist/numpy-1.0.4.dev$SVNVER && python setup.py scons)
+(cd $PREFIX/dist/numpy-1.0.4.dev$SVNVER && python setup.py scons --jobs=3 install --prefix=$PREFIX/dist/tmp)
+(cd $PREFIX/dist/tmp && PYTHONPATH=$PREFIX/dist/tmp/lib/python2.5/site-packages python -c "import numpy; numpy.test(level = 9999)")
 



More information about the Numpy-svn mailing list