[Numpy-discussion] remove need for site.cfg on default

Darren Dale dsdale24@gmail....
Thu Jan 15 09:18:07 CST 2009

Hi Jarrod,

On Wed, Jan 14, 2009 at 2:21 AM, Jarrod Millman <millman@berkeley.edu>wrote:

> Due to the fact that I was tired of adding site.cfg to scipy and numpy
> when building on Fedora and Ubuntu systems as well as a scipy ticket
> (http://scipy.org/scipy/numpy/ticket/985), I decided to try and add
> default system paths to numpy.distutils.  You can find out more
> details on this ticket:
>  http://projects.scipy.org/scipy/scipy/ticket/817
> I would like to have as many people test this as possible.  So I would
> like everyone, who has had to build numpy/scipy with a site.cfg
> despite having installed all the dependencies in the system default
> locations, to test this.  If you would please update to the numpy
> trunk and build numpy and scipy without your old site.cfg.  Regardless
> of whether it works or not, I would appreciate it if you could let me
> know.

I tested on Gentoo, which does some non-standard stuff in an attempt to be
able to switch between implementations. The libraries in /usr/lib are
symlinks to the implementations in /usr/lib/blas/, and you can have various
implementations like atlas, reference, or threaded-atlas, so I can run a
program called eselect that lets me switch between the implementations. For
some reason, gentoo renames the f77blas libs to simply blas. As a result, I
need to make a minor change numpy/distutils/system_info.py:

$ svn diff
Index: numpy/distutils/system_info.py
--- numpy/distutils/system_info.py      (revision 6323)
+++ numpy/distutils/system_info.py      (working copy)
@@ -90,7 +90,7 @@
 library_dirs = /usr/lib/3dnow:/usr/lib/3dnow/atlas
 # for overriding the names of the atlas libraries
-atlas_libs = lapack, f77blas, cblas, atlas
+atlas_libs = lapack, blas, cblas, atlas

 library_dirs = /usr/X11R6/lib
@@ -893,7 +893,7 @@
 class atlas_info(system_info):
     section = 'atlas'
     dir_env_var = 'ATLAS'
-    _lib_names = ['f77blas','cblas']
+    _lib_names = ['blas','cblas']
     if sys.platform[:7]=='freebsd':
         _lib_atlas = ['atlas_r']
         _lib_lapack = ['alapack_r']
@@ -1000,7 +1000,7 @@

 class atlas_blas_info(atlas_info):
-    _lib_names = ['f77blas','cblas']
+    _lib_names = ['blas','cblas']

     def calc_info(self):
         lib_dirs = self.get_lib_dirs()

On my system , the symlinks point to the threaded atlas implementation. I
ran the full tests and all tests passed except the 9 known failures.

In case you are interested, here is the layout on gentoo

$ slocate liblapack

$ slocate lib*blas:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090115/1a279554/attachment-0001.html 

More information about the Numpy-discussion mailing list