summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2010-01-04 17:50:26 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2010-01-04 17:50:26 +0000
commite6f50a08cd053461d005c3c6c7378516d7c3835d (patch)
tree1287b7a423ea24c622eed9e60c8dfc897d0e9488 /dev-python/numpy
parentrevision bump for bug #299599 (diff)
downloadgentoo-2-e6f50a08cd053461d005c3c6c7378516d7c3835d.tar.gz
gentoo-2-e6f50a08cd053461d005c3c6c7378516d7c3835d.tar.bz2
gentoo-2-e6f50a08cd053461d005c3c6c7378516d7c3835d.zip
Version bump. Removed most architecture specific patches, applied upstream. Fixed the site.cfg generation such that dotblas.so links with atlas when present (was broken with the introduction of EPREFIX)
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/ChangeLog12
-rw-r--r--dev-python/numpy/numpy-1.4.0.ebuild (renamed from dev-python/numpy/numpy-1.3.0.ebuild)101
2 files changed, 69 insertions, 44 deletions
diff --git a/dev-python/numpy/ChangeLog b/dev-python/numpy/ChangeLog
index 05425d347fad..6344aec1a5de 100644
--- a/dev-python/numpy/ChangeLog
+++ b/dev-python/numpy/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-python/numpy
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.103 2009/11/20 20:03:39 bicatali Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.104 2010/01/04 17:50:26 bicatali Exp $
+
+*numpy-1.4.0 (04 Jan 2010)
+
+ 04 Jan 2010; Sébastien Fabbro <bicatali@gentoo.org> -numpy-1.3.0.ebuild,
+ +numpy-1.4.0.ebuild:
+ Version bump. Removed most architecture specific patches, applied
+ upstream. Fixed the site.cfg generation such that dotblas.so links with
+ atlas when present (was broken with the introduction of EPREFIX)
20 Nov 2009; Sébastien Fabbro <bicatali@gentoo.org>
numpy-1.3.0-r2.ebuild:
diff --git a/dev-python/numpy/numpy-1.3.0.ebuild b/dev-python/numpy/numpy-1.4.0.ebuild
index 7c7d26c7cdeb..f6c374892b95 100644
--- a/dev-python/numpy/numpy-1.3.0.ebuild
+++ b/dev-python/numpy/numpy-1.4.0.ebuild
@@ -1,35 +1,44 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.3.0.ebuild,v 1.12 2009/08/29 19:07:57 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.4.0.ebuild,v 1.1 2010/01/04 17:50:26 bicatali Exp $
-NEED_PYTHON=2.4
-EAPI=2
-inherit eutils distutils flag-o-matic toolchain-funcs
+EAPI="2"
+SUPPORT_PYTHON_ABIS="1"
+
+inherit distutils eutils flag-o-matic toolchain-funcs versionator
+
+NP="${PN}-1.3"
DESCRIPTION="Fast array and numerical python library"
-SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz"
-HOMEPAGE="http://numpy.scipy.org/"
+HOMEPAGE="http://numpy.scipy.org/ http://pypi.python.org/pypi/numpy"
+SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz
+ doc? (
+ http://docs.scipy.org/doc/${NP}.x/numpy-html.zip -> ${NP}-html.zip
+ http://docs.scipy.org/doc/${NP}.x/numpy-ref.pdf -> ${NP}-ref.pdf
+ http://docs.scipy.org/doc/${NP}.x/numpy-user.pdf -> ${NP}-user.pdf
+ )"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+IUSE="doc lapack test"
RDEPEND="dev-python/setuptools
lapack? ( virtual/cblas virtual/lapack )"
DEPEND="${RDEPEND}
lapack? ( dev-util/pkgconfig )
- test? ( >=dev-python/nose-0.10 )"
-
-IUSE="lapack test"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ~ppc64 s390 sh sparc x86 ~x86-fbsd"
-LICENSE="BSD"
-
-# whatever LDFLAGS set will break linking
-# see progress in http://projects.scipy.org/scipy/numpy/ticket/573
-if [ -n "${LDFLAGS}" ]; then
- append-ldflags -shared
-else
- LDFLAGS="-shared"
-fi
+ test? ( >=dev-python/nose-0.10 )
+ doc? ( app-arch/unzip )"
+RESTRICT_PYTHON_ABIS="3.*"
pkg_setup() {
+ # See progress in http://projects.scipy.org/scipy/numpy/ticket/573
+ # with the subtle difference that we don't want to break Darwin where
+ # -shared is not a valid linker argument
+ if [[ ${CHOST} != *-darwin* ]] ; then
+ append-ldflags -shared
+ fi
+
# only one fortran to link with:
# linking with cblas and lapack library will force
# autodetecting and linking to all available fortran compilers
@@ -40,13 +49,16 @@ pkg_setup() {
export NUMPY_FCONFIG="config_fc --noopt --noarch"
}
+src_unpack() {
+ unpack ${P}.tar.gz
+ if use doc; then
+ unzip -qo "${DISTDIR}"/${NP}-html.zip -d html || die
+ fi
+}
+
src_prepare() {
- # Fix some paths and docs in f2py
epatch "${FILESDIR}"/${PN}-1.1.0-f2py.patch
-
- epatch "${FILESDIR}/${P}-parisc.patch" # bug 277438
- epatch "${FILESDIR}/${P}-alpha.patch" # bug 277438
- epatch "${FILESDIR}/${P}-arm-sh.patch"
+ epatch "${FILESDIR}"/${PN}-1.3.0-fenv-freebsd.patch # bug 279487
# Gentoo patch for ATLAS library names
sed -i \
@@ -60,13 +72,13 @@ src_prepare() {
if use lapack; then
append-ldflags "$(pkg-config --libs-only-other cblas lapack)"
sed -i -e '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py || die
+ local libdir="${EPREFIX}"/usr/$(get_libdir)
cat >> site.cfg <<-EOF
[atlas]
include_dirs = $(pkg-config --cflags-only-I \
cblas | sed -e 's/^-I//' -e 's/ -I/:/g')
library_dirs = $(pkg-config --libs-only-L \
- cblas blas lapack | sed -e \
- 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):/usr/$(get_libdir)
+ cblas blas lapack | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir}
atlas_libs = $(pkg-config --libs-only-l \
cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
lapack_libs = $(pkg-config --libs-only-l \
@@ -75,14 +87,12 @@ src_prepare() {
include_dirs = $(pkg-config --cflags-only-I \
cblas | sed -e 's/^-I//' -e 's/ -I/:/g')
library_dirs = $(pkg-config --libs-only-L \
- cblas blas | sed -e 's/^-L//' -e 's/ -L/:/g' \
- -e 's/ //g'):/usr/$(get_libdir)
+ cblas blas | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir}
libraries = $(pkg-config --libs-only-l \
cblas blas | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
[lapack_opt]
library_dirs = $(pkg-config --libs-only-L \
- lapack | sed -e 's/^-L//' -e 's/ -L/:/g' \
- -e 's/ //g'):/usr/$(get_libdir)
+ lapack | sed -e 's/^-L//' -e 's/ -L/:/g' -e 's/ //g'):${libdir}
libraries = $(pkg-config --libs-only-l \
lapack | sed -e 's/^-l//' -e 's/ -l/, /g' -e 's/,.pthread//g')
EOF
@@ -96,22 +106,29 @@ src_compile() {
}
src_test() {
- "${python}" setup.py ${NUMPY_FCONFIG} install \
- --home="${S}"/test \
- --no-compile \
- || die "install test failed"
- pushd "${S}"/test/lib*
- PYTHONPATH=python "${python}" -c "import numpy; numpy.test()" 2>&1 | tee test.log
- grep -q '^ERROR' test.log && die "test failed"
- popd
- rm -rf test
+ testing() {
+ "$(PYTHON)" setup.py ${NUMPY_FCONFIG} build -b "build-${PYTHON_ABI}" install \
+ --home="${S}/test-${PYTHON_ABI}" --no-compile || die "install test failed"
+ pushd "${S}/test-${PYTHON_ABI}/"lib* > /dev/null
+ PYTHONPATH=python "$(PYTHON)" -c "import numpy; numpy.test()" 2>&1 | tee test.log
+ grep -q '^ERROR' test.log && die "test failed"
+ popd > /dev/null
+ rm -fr test-${PYTHON_ABI}
+ }
+ python_execute_function testing
}
src_install() {
+ [[ -z ${ED} ]] && local ED=${D}
distutils_src_install ${NUMPY_FCONFIG}
dodoc THANKS.txt DEV_README.txt COMPATIBILITY
- rm -f "${D}"/usr/lib/python*/site-packages/numpy/*.txt || die
+ rm -f "${ED}"/usr/lib/python*/site-packages/numpy/*.txt || die
docinto f2py
dodoc numpy/f2py/docs/*.txt || die "dodoc f2py failed"
doman numpy/f2py/f2py.1 || die "doman failed"
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ doins -r "${WORKDIR}"/html || die
+ doins "${DISTDIR}"/${NP}*pdf || die
+ fi
}