[Scipy-svn] r3567 - branches/scipy.scons/scipy/linalg

scipy-svn@scip... scipy-svn@scip...
Thu Nov 22 06:38:15 CST 2007


Author: cdavid
Date: 2007-11-22 06:38:12 -0600 (Thu, 22 Nov 2007)
New Revision: 3567

Modified:
   branches/scipy.scons/scipy/linalg/SConstruct
Log:
Use special wrapper for Mac OS X fblas when built with scons

Modified: branches/scipy.scons/scipy/linalg/SConstruct
===================================================================
--- branches/scipy.scons/scipy/linalg/SConstruct	2007-11-22 10:55:50 UTC (rev 3566)
+++ branches/scipy.scons/scipy/linalg/SConstruct	2007-11-22 12:38:12 UTC (rev 3567)
@@ -1,4 +1,4 @@
-# Last Change: Thu Nov 22 12:00 PM 2007 J
+# Last Change: Thu Nov 22 05:00 PM 2007 J
 # vim:syntax=python
 
 import os
@@ -8,26 +8,15 @@
 from numpy.distutils.scons import get_python_inc#, get_pythonlib_dir
 from numpy.distutils.scons import GetNumpyEnvironment
 from numpy.distutils.scons import CheckCBLAS, CheckF77BLAS, CheckF77LAPACK,\
-                                  CheckCLAPACK
+                                  CheckCLAPACK, IsVeclib, IsAccelerate, IsATLAS
 
 from scons_support import do_generate_interface, do_generate_fake_interface, \
                           generate_interface_emitter
-#from numpy.distutils.scons.configuration import write_info
+from numpy.distutils.scons.configuration import write_info
 
 #from scons_support import CheckBrokenMathlib, define_no_smp, \
 #    generate_config_header, generate_config_header_emitter
 
-#-------------------
-# To skip wrapping single precision atlas/lapack/blas routines, set
-# the following flag to True:
-skip_single_routines = 0
-
-# Some OS distributions (e.g. Redhat, Suse) provide a blas library that
-# is built using incomplete blas sources that come with lapack tar-ball.
-# In order to use such a library in scipy.linalg, the following flag
-# must be set to True:
-using_lapack_blas = 0
-
 env = GetNumpyEnvironment(ARGUMENTS)
 env.Append(CPPPATH = [get_python_inc(), get_numpy_include_dirs()])
 #if os.name == 'nt':
@@ -39,7 +28,6 @@
 #=======================
 # Starting Configuration
 #=======================
-# XXX: separate env for configuration
 config = env.NumpyConfigure(custom_tests = {'CheckCBLAS' : CheckCBLAS,
                                             'CheckBLAS' : CheckF77BLAS,
                                             'CheckCLAPACK' : CheckCLAPACK,
@@ -67,7 +55,7 @@
     has_clapack = 0
 
 config.Finish()
-#write_info(env)
+write_info(env)
 
 #==========
 #  Build
@@ -86,9 +74,13 @@
 #------------
 #   fblas
 #------------
-# XXX: handle Accelerate problem
 env.haha('fblas', 'generic_fblas.pyf')
-env.NumpyPythonExtension('fblas', source = ['fblas.pyf', pjoin('src', 'fblaswrap.f')])
+source = ['fblas.pyf']
+if IsVeclib(env, 'blas') or IsAccelerate(env, 'blas'):
+    source.append(pjoin('src', 'fblaswrap_veclib_c.c'))
+else:
+    source.append(pjoin('src', 'fblaswrap.f'))
+env.NumpyPythonExtension('fblas', source)
 
 #------------
 #   cblas
@@ -163,5 +155,6 @@
 # Atlas version
 #--------------
 atlas_env = env.Copy()
-atlas_env.AppendUnique(CPPDEFINES = "NO_ATLAS_INFO")
+if not IsATLAS(env, 'blas'):
+    atlas_env.AppendUnique(CPPDEFINES = "NO_ATLAS_INFO")
 atlas_env.NumpyPythonExtension('atlas_version', 'atlas_version.c')



More information about the Scipy-svn mailing list