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

numpy-svn@scip... numpy-svn@scip...
Fri Nov 23 21:28:38 CST 2007


Author: cdavid
Date: 2007-11-23 21:28:27 -0600 (Fri, 23 Nov 2007)
New Revision: 4501

Modified:
   branches/numpy.scons/numpy/distutils/scons/checkers/perflib.py
   branches/numpy.scons/numpy/scons_fake/checkers/SConstruct
Log:
scons: Get*Version does not return version when libname does not mach

Modified: branches/numpy.scons/numpy/distutils/scons/checkers/perflib.py
===================================================================
--- branches/numpy.scons/numpy/distutils/scons/checkers/perflib.py	2007-11-24 02:19:50 UTC (rev 4500)
+++ branches/numpy.scons/numpy/distutils/scons/checkers/perflib.py	2007-11-24 03:28:27 UTC (rev 4501)
@@ -1,5 +1,5 @@
 #! /usr/bin/env python
-# Last Change: Thu Nov 22 05:00 PM 2007 J
+# Last Change: Sat Nov 24 12: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
@@ -102,7 +102,8 @@
             raise RuntimeError("name %s is unknown")
 
         def f(env, libname):
-            if env['NUMPY_PKG_CONFIG'][libname] is None:
+            if env['NUMPY_PKG_CONFIG'][libname] is None or \
+               not env['NUMPY_PKG_CONFIG'][libname].name == _CONFIG[name].name:
                 return 'No version info'
             else:
                 return env['NUMPY_PKG_CONFIG'][libname].version

Modified: branches/numpy.scons/numpy/scons_fake/checkers/SConstruct
===================================================================
--- branches/numpy.scons/numpy/scons_fake/checkers/SConstruct	2007-11-24 02:19:50 UTC (rev 4500)
+++ branches/numpy.scons/numpy/scons_fake/checkers/SConstruct	2007-11-24 03:28:27 UTC (rev 4501)
@@ -2,7 +2,7 @@
 from numpy.distutils.scons import GetNumpyEnvironment
 from numpy.distutils.scons.checkers.perflib import \
         CheckATLAS, CheckAccelerate, CheckMKL, CheckSunperf,\
-        IsMKL, IsATLAS, IsAccelerate, GetATLASVersion
+        IsMKL, IsATLAS, IsAccelerate, GetATLASVersion, GetMKLVersion
 from numpy.distutils.scons.checkers.custom_checkers import CheckCBLAS, \
         CheckCLAPACK, CheckF77BLAS, CheckF77LAPACK
 from numpy.distutils.scons import CheckF77Mangling
@@ -33,17 +33,18 @@
     st, opts = config.CheckMKL(autoadd = 0)
     st, opts = config.CheckAccelerate(autoadd = 0)
     st, opts = config.CheckSunperf(autoadd = 0)
-    st = config.CheckF77BLAS(autoadd = 0)
+    st = config.CheckF77BLAS(autoadd = 0, check_version = True)
     st = config.CheckCBLAS(autoadd = 0)
     st = config.CheckF77LAPACK(autoadd = 0)
     st = config.CheckCLAPACK(autoadd = 0)
     st = config.CheckF77Mangling()
 
-    print "Is blas MKL ? %s" % IsMKL(env, 'blas')
-    print "Is cblas MKL ? %s" % IsMKL(env, 'cblas')
-    print "Is blas ATLAS ? %s" % IsATLAS(env, 'blas')
-    print "Is cblas ATLAS ? %s" % IsATLAS(env, 'cblas')
+    if IsMKL(env, 'blas'):
+        print "blas is MKL (%s)" % GetMKLVersion(env, 'blas')
 
+    if IsATLAS(env, 'blas'):
+        print "blas is ATLAS (%s)" % GetATLASVersion(env, 'blas')
+
     if env.has_key('LIBS'):
         print "LIBS of env is %s" % env.Dump('LIBS')
     else:



More information about the Numpy-svn mailing list