-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Darren,

> I thought I might try to get some work done on a few science-related python 
> packages. A reminder of what was at issue:

I'm really sorry to have forgotten you and your BUG. I've been a bit
busy with my studies. You should have poked me earlier in regard to this
per mail ;-) I need poking or I get distracted :-/

> Numeric, numarray and scipy all have the ability to link to blas,lapack and 
> atlas libraries. By default, numeric and numarray will build against their 
> own internal, and slower, libraries.
> 
> I had submitted an ebuild for Numeric which,  if USE=atlas, modified the 
> install script to link to the libraries provided by lapack-atlas (and its 
> dependency, blas-atlas), and made lapack-atlas a dependency. One of the devs 
> improved upon my initial offering, suggesting that they were no longer using 
> the atlas use flag, and changed the dependency to virtual lapack.

Back to this, i had to modify the build a little more and i dropped your
patch entirely in order to use sed. We need to use sed, as we have to
set the library dir in setup.py. As this is lib64 on amd64 f.e, we have
to use $(get_libdir) to refer to the right libdir. I have attached 2
little patches against numeric-23.7 and numeric-23.8. They compile fine
for me, and I'm now interested if you find any regressions. If they work
for you, I'll add them to CVS ASAP (promised!!) :-)

> Numeric, numarray, and scipy all need atlas specific information during the 
> build, if it is available. How can I get the atlas information into the setup 
> scripts, if it is appropriate to do so? 

You refer to cblas.h? I'll be adding it to numerics ${FILESDIR}, as
cblas.h is licensed under BSD license. Legally, no problem ;-)

> What happens if Numeric is built against lapack-atlas, and then I use 
> lapack-config to switch to MKL? Numeric would still be linked to libatlas.*, 
> is that a problem?
No. Numeric is build against /usr/$(get_libdir)/liblapack.so, everytime.
liblapack.so itself is a symlink to whatever you choose to let it point
to. When you change that symlink to libfoo.so, numeric will use
libfoo.so instead of ATLAS's liblapack.so.

Danny
- --
Danny van Dyk <[EMAIL PROTECTED]>
Gentoo/AMD64 Project, Gentoo Scientific Project
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCfVXZaVNL8NrtU6IRAt3FAJ47F9VlSDjPLvkeaA38qrszYdczwgCcC0jw
osCWFy5B2R7YEoPopvN+VX4=
=wX01
-----END PGP SIGNATURE-----
--- numeric-23.7.ebuild 2005-05-01 18:35:33.000000000 +0200
+++ numeric-23.7-r1.ebuild      2005-05-08 01:19:24.000000000 +0200
@@ -7,22 +7,27 @@
 MY_P=${P/n/N}
 S=${WORKDIR}/${MY_P}
 
-DESCRIPTION="a fast, compact, multidimensional array language facility"
-HOMEPAGE="http://www.pfdubois.com/numpy/";
+DESCRIPTION="Numerical Python adds a fast, compact, multidimensional array 
language facility to Python"
+HOMEPAGE="http://numeric.scipy.org/";
 SRC_URI="mirror://sourceforge/numpy/${MY_P}.tar.gz"
 
 LICENSE="as-is"
 SLOT="0"
-KEYWORDS="~alpha ~amd64 hppa ~ia64 ~ppc ~ppc64 ~s390 sparc x86"
+KEYWORDS="~alpha ~amd64 hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
 IUSE=""
 
 # 2.1 gave sandbox violations see #21
-DEPEND=">=dev-lang/python-2.2"
+DEPEND=">=dev-lang/python-2.2
+       virtual/blas"
 
 src_unpack() {
        unpack ${A}
-       cd "${S}"
-       epatch "${FILESDIR}"/${P}.patch
+       cd ${S}
+       cp ${FILESDIR}/cblas.h ${S}/Include/
+       sed -i \
+               -e "s|\(library_dirs_list\ =\ 
\[\).*|\1\'/usr/$(get_libdir)\']|g" \
+               -e "s|\(libraries_list.*\)f77blas|\1blas|g" \
+               setup.py
 }
 
 src_install() {
--- numeric-23.8.ebuild 2005-04-25 19:20:49.000000000 +0200
+++ /usr/portage/dev-python/numeric/numeric-23.8.ebuild 2005-05-08 
01:51:40.000000000 +0200
@@ -19,6 +19,18 @@
 # 2.1 gave sandbox violations see #21
 DEPEND=">=dev-lang/python-2.2"
 
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       cp ${FILESDIR}/cblas.h ${S}/Include/
+       sed -i \
+               -e "s:\(library_dirs_list\ =\ 
\[\).*:\1\'/usr/$(get_libdir)\']:g" \
+               -e 
"s:^\(.*\)\(blas\|f2c\|\(z\|d\)lapack\|\)\(_lite.c\):#\1\2\3:g" \
+               -e "s:\(libraries_list\ =\ \[\)\]#:\1:g" \
+               -e "s:\(libraries_list.*\)f77blas:\1blas:g" \
+               setup.py
+}
+
 src_install() {
 
        distutils_src_install

Reply via email to