[Numpy-svn] r4390 - branches/numpy.scons/numpy/distutils/scons/checkers

numpy-svn@scip... numpy-svn@scip...
Mon Nov 5 05:40:11 CST 2007


Author: cdavid
Date: 2007-11-05 05:40:06 -0600 (Mon, 05 Nov 2007)
New Revision: 4390

Modified:
   branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py
   branches/numpy.scons/numpy/distutils/scons/checkers/perflib.py
Log:
Make it possible to disable a perflib from env variable.

Modified: branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py	2007-11-05 10:26:27 UTC (rev 4389)
+++ branches/numpy.scons/numpy/distutils/scons/checkers/custom_checkers.py	2007-11-05 11:40:06 UTC (rev 4390)
@@ -41,10 +41,10 @@
             if st:
                 add_info(env, 'cblas', opts)
                 return st
-            #st, opts = CheckVeclib(context, autoadd)
-            #if st:
-            #    add_info(env, 'cblas', opt_info('vecLib'))
-            #    return st
+            st, opts = CheckVeclib(context, autoadd)
+            if st:
+                add_info(env, 'cblas', opt_info('vecLib'))
+                return st
 
             add_info(env, 'cblas', 'Def numpy implementation used')
             return 0
@@ -88,6 +88,11 @@
                 if st:
                     add_info(env, 'lapack: Accelerate', opts)
                 return st
+            st, opts = CheckAccelerate(context, autoadd)
+            if st:
+                if st:
+                    add_info(env, 'lapack: vecLib', opts)
+                return st
 
         else:
             # Get fortran stuff

Modified: branches/numpy.scons/numpy/distutils/scons/checkers/perflib.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/checkers/perflib.py	2007-11-05 10:26:27 UTC (rev 4389)
+++ branches/numpy.scons/numpy/distutils/scons/checkers/perflib.py	2007-11-05 11:40:06 UTC (rev 4390)
@@ -1,5 +1,5 @@
 #! /usr/bin/env python
-# Last Change: Wed Oct 31 08:00 PM 2007 J
+# Last Change: Mon Nov 05 07:00 PM 2007 J
 
 # This module defines checkers for performances libs providing standard API,
 # such as MKL (Intel), ATLAS, Sunperf (solaris and linux), Accelerate (Mac OS
@@ -8,6 +8,7 @@
 # Generally, you don't use those directly: they are used in 'meta' checkers,
 # such as BLAS, CBLAS, LAPACK checkers.
 import re
+import os
 from os.path import join as pjoin
 
 from numpy.distutils.system_info import default_lib_dirs
@@ -29,6 +30,13 @@
     See CheckATLAS or CheckMKL for examples."""
     context.Message("Checking %s ... " % name)
 
+    try:
+        value = os.environ[name]
+        if value == 'None':
+            return context.Result('Disabled from env through var %s !' % name), {}
+    except KeyError:
+        pass
+
     # Get site.cfg customization if any
     siteconfig, cfgfiles = get_config()
     (cpppath, libs, libpath), found = get_config_from_section(siteconfig, section)
@@ -200,7 +208,7 @@
     return _check(context, name, section, defopts, headers, funcs,
                   check_version, None, autoadd)
 
-def CheckVeclib(context, autoadd = 1):
+def CheckVeclib(context, autoadd = 1, check_version = 0):
     """Checker for Veclib framework (on Mac OS X < 10.3)."""
     name    = 'Framework: Accelerate'
     # XXX: does it make sense to customize mac os X frameworks ?



More information about the Numpy-svn mailing list