diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2007-04-05 10:32:11 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2007-04-05 10:32:11 +0000 |
commit | 7ed4ab1e7a325fbbd3ca5604ca06aa5c678bc274 (patch) | |
tree | 221be1631c03b4a3ead605fe9b4e14189f6fde46 /dev-python | |
parent | Version bump, cleanup, patch naming change (diff) | |
download | gentoo-2-7ed4ab1e7a325fbbd3ca5604ca06aa5c678bc274.tar.gz gentoo-2-7ed4ab1e7a325fbbd3ca5604ca06aa5c678bc274.tar.bz2 gentoo-2-7ed4ab1e7a325fbbd3ca5604ca06aa5c678bc274.zip |
Version bump.
(Portage version: 2.1.2.2)
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/numpy/ChangeLog | 7 | ||||
-rw-r--r-- | dev-python/numpy/files/digest-numpy-1.0.2 | 3 | ||||
-rw-r--r-- | dev-python/numpy/numpy-1.0.2.ebuild | 164 |
3 files changed, 173 insertions, 1 deletions
diff --git a/dev-python/numpy/ChangeLog b/dev-python/numpy/ChangeLog index 5b23dc2267fe..b7a0b2b5a5db 100644 --- a/dev-python/numpy/ChangeLog +++ b/dev-python/numpy/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-python/numpy # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.21 2007/03/06 10:06:04 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.22 2007/04/05 10:32:11 bicatali Exp $ + +*numpy-1.0.2 (05 Apr 2007) + + 05 Apr 2007; Sébastien Fabbro <bicatali@gentoo.org> +numpy-1.0.2.ebuild: + Version bump. Closing #173359. 06 Mar 2007; Sébastien Fabbro <bicatali@gentoo.org> numpy-1.0.1-r1.ebuild: diff --git a/dev-python/numpy/files/digest-numpy-1.0.2 b/dev-python/numpy/files/digest-numpy-1.0.2 new file mode 100644 index 000000000000..192a3b615bf2 --- /dev/null +++ b/dev-python/numpy/files/digest-numpy-1.0.2 @@ -0,0 +1,3 @@ +MD5 8be83678056ae31bfe641d35bbc181f4 numpy-1.0.2.tar.gz 1400121 +RMD160 e41ade8e070357cef5ea65f56ac883e0d3a5cef3 numpy-1.0.2.tar.gz 1400121 +SHA256 1f253c7482895f7ec95cb57f5f412eafcf3be23eaebdb7d1b7bbcc2c8a65c226 numpy-1.0.2.tar.gz 1400121 diff --git a/dev-python/numpy/numpy-1.0.2.ebuild b/dev-python/numpy/numpy-1.0.2.ebuild new file mode 100644 index 000000000000..08ee50e6c825 --- /dev/null +++ b/dev-python/numpy/numpy-1.0.2.ebuild @@ -0,0 +1,164 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.0.2.ebuild,v 1.1 2007/04/05 10:32:11 bicatali Exp $ + +NEED_PYTHON=2.3 + +inherit distutils eutils fortran + +MY_P=${P/_beta/b} +MY_P=${MY_P/_} +DESCRIPTION="Python array processing for numbers, strings, records, and objects" +SRC_URI="mirror://sourceforge/numpy/${MY_P}.tar.gz" +HOMEPAGE="http://numeric.scipy.org/" + +RDEPEND="!dev-python/f2py + lapack? ( || ( >=sci-libs/blas-atlas-3.7.11-r1 + >=sci-libs/cblas-reference-20030223-r3 ) + virtual/lapack )" +DEPEND="${RDEPEND} + lapack? ( app-admin/eselect-cblas )" + +IUSE="lapack" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +LICENSE="BSD" + +S="${WORKDIR}/${MY_P}" + +FORTRAN="g77 gfortran" + +numpy_configure() { + local mycblas + if use lapack; then + for d in $(eselect cblas show); do mycblas=${d}; done + if [[ -z "${mycblas/reference/}" ]] && [[ -z "${mycblas/atlas/}" ]]; then + ewarn "You need to set cblas to atlas or reference. Do:" + ewarn " eselect cblas set <impl>" + ewarn "where <impl> is atlas, threaded-atlas or reference" + die "setup failed" + fi + fi + [[ -z "${F77FLAGS}" ]] && F77FLAGS="${CFLAGS}" + [[ -z "${FFLAGS}" ]] && FFLAGS="${F77FLAGS}" + + # remove default values + echo "# gentoo config" > site.cfg + + export BLAS=None + export LAPACK=None + export ATLAS=None + export PTATLAS=None + export MKL=None + + if use lapack; then + echo "[blas_opt]" >> site.cfg + case "${mycblas}" in + reference) + echo "include_dirs = /usr/include/cblas" >> site.cfg + echo "libraries = blas, cblas" >> site.cfg + unset BLAS + ;; + atlas|threaded-atlas) + echo "include_dirs = /usr/include/atlas" >> site.cfg + echo "libraries = blas, cblas, atlas" >> site.cfg + unset ATLAS + ;; + *) + local msg="Invalid cblas implementation: ${cblas}" + eerror "${msg}" + die "${msg}" + ;; + esac + echo "[lapack_opt]" >> site.cfg + echo "libraries = lapack" >> site.cfg + unset LAPACK + fi + # Map compilers to what numpy calls them (same as scipy) + case "${FORTRANC}" in + gfortran) + NUMPY_FC="gnu95" + ;; + g77) + NUMPY_FC="gnu" + ;; + g95) + NUMPY_FC="g95" + ;; + ifc|ifort) + if use ia64; then + NUMPY_FC="intele" + elif use amd64; then + NUMPY_FC="intelem" + else + NUMPY_FC="intel" + fi + ;; + *) + local msg="Invalid Fortran compiler \'${FORTRANC}\'" + eerror "${msg}" + die "${msg}" + ;; + esac + export NUMPY_FC + # http://projects.scipy.org/scipy/numpy/ticket/182 + # Can't set LDFLAGS + unset LDFLAGS +} + +src_unpack() { + fortran_src_unpack + cd "${S}" + # fix some paths and docs in f2py + epatch "${FILESDIR}"/${PN}-1.0.1-f2py.patch + + # gentoo patch for ATLAS library names + sed -i \ + -e "s:'f77blas':'blas':g" \ + -e "s:'ptblas':'blas':g" \ + -e "s:'ptcblas':'cblas':g" \ + -e "s:'lapack_atlas':'lapack':g" \ + numpy/distutils/system_info.py +} + +src_compile() { + numpy_configure + distutils_src_compile \ + config_fc \ + --fcompiler=${NUMPY_FC} \ + --opt="${FFLAGS}" +} + +src_test() { + # see comment before the distutils_src_install + numpy_configure + ${python} setup.py install \ + --home="${S}"/test \ + --no-compile \ + config_fc \ + --fcompiler=${NUMPY_FC} \ + --opt="${FFLAGS}" || die "install test failed" + pushd "${S}"/test/lib*/python + PYTHONPATH=. "${python}" -c \ + "import numpy as n;import sys;sys.exit(n.test(10,3))" \ + > test.log 2>&1 + grep -q OK test.log || die "test failed" + popd + rm -rf test +} + +src_install() { + # we need to do the configuring again, for some reason, the + # variables are not kept within setup.py functions + numpy_configure + distutils_src_install \ + config_fc \ + --fcompiler=${NUMPY_FC} \ + --opt="${FFLAGS}" + + docinto numpy + dodoc numpy/doc/*txt + docinto f2py + dodoc numpy/f2py/docs/*txt + doman numpy/f2py/f2py.1 +} |