diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2007-10-15 18:46:46 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2007-10-15 18:46:46 +0000 |
commit | 1e8837dbdb64f7a9f6a913c212427f4c09ac6be7 (patch) | |
tree | 930f4a407c02bec5c6e60421365fe9a7bf5d7e6d /dev-python | |
parent | Bump xen-tools to version 3.1.1 (diff) | |
download | historical-1e8837dbdb64f7a9f6a913c212427f4c09ac6be7.tar.gz historical-1e8837dbdb64f7a9f6a913c212427f4c09ac6be7.tar.bz2 historical-1e8837dbdb64f7a9f6a913c212427f4c09ac6be7.zip |
use new virtual/cblas. added an (incomplete) patch for python-2.5. some cleanup.
Package-Manager: portage-2.1.3.12
Diffstat (limited to 'dev-python')
-rw-r--r-- | dev-python/numarray/ChangeLog | 7 | ||||
-rw-r--r-- | dev-python/numarray/Manifest | 30 | ||||
-rw-r--r-- | dev-python/numarray/files/numarray-1.5.2-python25.patch | 40 | ||||
-rw-r--r-- | dev-python/numarray/numarray-1.5.2-r1.ebuild | 85 |
4 files changed, 97 insertions, 65 deletions
diff --git a/dev-python/numarray/ChangeLog b/dev-python/numarray/ChangeLog index 273041542b41..b6eabc4798ef 100644 --- a/dev-python/numarray/ChangeLog +++ b/dev-python/numarray/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-python/numarray # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/ChangeLog,v 1.27 2007/06/07 22:49:44 lavajoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/ChangeLog,v 1.28 2007/10/15 18:46:45 bicatali Exp $ + + 15 Oct 2007; SĂ©bastien Fabbro <bicatali@gentoo.org> + +files/numarray-1.5.2-python25.patch, numarray-1.5.2-r1.ebuild: + use new virtual/cblas. added an (incomplete) patch for python-2.5. some + cleanup. 07 Jun 2007; Joe Peterson <lavajoe@gentoo.org> numarray-1.5.2-r1.ebuild: Add ~x86-fbsd keyword (bug #178368) diff --git a/dev-python/numarray/Manifest b/dev-python/numarray/Manifest index f477a2e5bd88..21a07aeb0e10 100644 --- a/dev-python/numarray/Manifest +++ b/dev-python/numarray/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX numarray-1.5.2-freebsd.patch 805 RMD160 48813fe9590f7dadbe808c58dcc2095fde0f63c4 SHA1 2440851910c70d368da3ebffe038e8f3dc8afaf0 SHA256 03704871fe9dfcfe7dea85814bafaacfe35524084c9233f50c7e1398202b771f MD5 b22c487ddb2b299b22ca70be56bc37ba files/numarray-1.5.2-freebsd.patch 805 RMD160 48813fe9590f7dadbe808c58dcc2095fde0f63c4 files/numarray-1.5.2-freebsd.patch 805 @@ -6,6 +9,10 @@ AUX numarray-1.5.2-includes.patch 1763 RMD160 24bb7992e8e898b00ab90b7e82120eb7c7 MD5 98e007f8a6b5d0805b02bd2de59b7749 files/numarray-1.5.2-includes.patch 1763 RMD160 24bb7992e8e898b00ab90b7e82120eb7c7b2ba4c files/numarray-1.5.2-includes.patch 1763 SHA256 02016cf4b2038aff9cd8a6bc388da7dd2e461ef28b869c47f642a8a31033c6d5 files/numarray-1.5.2-includes.patch 1763 +AUX numarray-1.5.2-python25.patch 1407 RMD160 194398ab45b27f476a0056ffe4e1789f1f09743d SHA1 447837cb9f79115a95c1678c36baa87e962868a2 SHA256 3eae38202551209ef1c1d647aa03ba4eef85bf9330ddd6693035342ba688e765 +MD5 3823c11b11479da6872f86ecc2b2bf14 files/numarray-1.5.2-python25.patch 1407 +RMD160 194398ab45b27f476a0056ffe4e1789f1f09743d files/numarray-1.5.2-python25.patch 1407 +SHA256 3eae38202551209ef1c1d647aa03ba4eef85bf9330ddd6693035342ba688e765 files/numarray-1.5.2-python25.patch 1407 AUX numarray-1.5.2-refcount.patch 289 RMD160 b8a0f68560881aa08fd0e93bc9086b1b0b97acad SHA1 e3ee147d59ea164db7912ad8e6a3f76409ca6031 SHA256 775d401415a8509e00d064b4323986aa1083aa4331094e94027799f8c1f2768f MD5 9c5dfe77fd316676d570647bba4c36a6 files/numarray-1.5.2-refcount.patch 289 RMD160 b8a0f68560881aa08fd0e93bc9086b1b0b97acad files/numarray-1.5.2-refcount.patch 289 @@ -32,14 +39,14 @@ EBUILD numarray-1.5.1.ebuild 743 RMD160 a811282e45cc70c1f50e0d584b5a0af22f0eaebe MD5 98cbace5be171cac68af3f20539fab0a numarray-1.5.1.ebuild 743 RMD160 a811282e45cc70c1f50e0d584b5a0af22f0eaebe numarray-1.5.1.ebuild 743 SHA256 d4616f0eff2db1d0081d9bb321e6557bc858527a7bea931ed73ad66d7bc44c1e numarray-1.5.1.ebuild 743 -EBUILD numarray-1.5.2-r1.ebuild 3603 RMD160 c3ad4cdfea3ede651d37055f93028ae2f18796f5 SHA1 a04f76c5d0124ec1d7accabd8aeebde2e26d0733 SHA256 ce6ea2853c3c5f2d3f89f01e8f92aa4e55dbe011416da147849d9d96bfc9ce8d -MD5 e1cefd409bb92e9e4802c859594a6be4 numarray-1.5.2-r1.ebuild 3603 -RMD160 c3ad4cdfea3ede651d37055f93028ae2f18796f5 numarray-1.5.2-r1.ebuild 3603 -SHA256 ce6ea2853c3c5f2d3f89f01e8f92aa4e55dbe011416da147849d9d96bfc9ce8d numarray-1.5.2-r1.ebuild 3603 -MISC ChangeLog 4217 RMD160 6efd5d3aa35f2641b581c84da6937d4d9f0585b1 SHA1 a86a908259dce7e3ec44c034f85153ee54d68fd7 SHA256 45c54ad39a05646f3567989ebafd53dc1b204787199dace3d15fcf1ee2f78b08 -MD5 271853d6c9be9d4ccbab29d9f840747d ChangeLog 4217 -RMD160 6efd5d3aa35f2641b581c84da6937d4d9f0585b1 ChangeLog 4217 -SHA256 45c54ad39a05646f3567989ebafd53dc1b204787199dace3d15fcf1ee2f78b08 ChangeLog 4217 +EBUILD numarray-1.5.2-r1.ebuild 2850 RMD160 4cd6f77365df34c47ce467a073bbbc983633a271 SHA1 52606b0bf520465fc6c184a4af50cbe578d259d2 SHA256 7241ba1fcdda11224e867bf3f072919fd207d9c9e656c60764f2294bd6a61a2a +MD5 8434b9c499ae352b507dd30e4d3b6f49 numarray-1.5.2-r1.ebuild 2850 +RMD160 4cd6f77365df34c47ce467a073bbbc983633a271 numarray-1.5.2-r1.ebuild 2850 +SHA256 7241ba1fcdda11224e867bf3f072919fd207d9c9e656c60764f2294bd6a61a2a numarray-1.5.2-r1.ebuild 2850 +MISC ChangeLog 4425 RMD160 d27a15a04639eab13bf310eb52765099daa79721 SHA1 a2712acefa9998082c8975330b62c78969152c56 SHA256 1d2df8e5aea53689b38a53d460732b35b5e4f379baf28910b530fbabf0a8c946 +MD5 532fc52a0fa01454076a93eb05903c74 ChangeLog 4425 +RMD160 d27a15a04639eab13bf310eb52765099daa79721 ChangeLog 4425 +SHA256 1d2df8e5aea53689b38a53d460732b35b5e4f379baf28910b530fbabf0a8c946 ChangeLog 4425 MISC metadata.xml 950 RMD160 678f238a25e95981f6668360be4f564a84eafba8 SHA1 5b2721eab57bd7bb4946400354edd4d162930fc3 SHA256 1e4851dd9530a0ee08781b710b138653904b195fdb4d2e62152ad4f2534acaf8 MD5 a97691f0d19210f3741485b1ca4dcf37 metadata.xml 950 RMD160 678f238a25e95981f6668360be4f564a84eafba8 metadata.xml 950 @@ -59,3 +66,10 @@ SHA256 6e1fe18b9b0d4130d9bcae570114c298324519ee06a5eccd64d2a7acd3c1dbc2 files/di MD5 8156150213bcbcb20722f62a1981476e files/digest-numarray-1.5.2-r1 500 RMD160 08839452392d78160290d8ce7baffbd114f7d18e files/digest-numarray-1.5.2-r1 500 SHA256 4527949b921e98437b3d48fec263d3180b6a2ff67b4f9da18082310d07a3a312 files/digest-numarray-1.5.2-r1 500 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.7 (GNU/Linux) + +iD8DBQFHE7Wb1ycZbhPLE2ARAnKuAJ97B5rBuUf1oJMFU3KGtMzLqxJ18ACdE4sb +ijKWIQ08cOYNWHPLi6R5s0E= +=jWJh +-----END PGP SIGNATURE----- diff --git a/dev-python/numarray/files/numarray-1.5.2-python25.patch b/dev-python/numarray/files/numarray-1.5.2-python25.patch new file mode 100644 index 000000000000..6d7621984a4a --- /dev/null +++ b/dev-python/numarray/files/numarray-1.5.2-python25.patch @@ -0,0 +1,40 @@ +--- Src/_ndarraymodule.c.orig 2007-09-05 09:54:58.759967037 +0100 ++++ Src/_ndarraymodule.c 2007-09-05 09:54:36.098675644 +0100 +@@ -596,12 +596,12 @@ + + /* Copied from Python-2.3.3 Objects/sliceobject.c */ + int +-_GetIndicesEx(PySliceObject *r, int length, +- int *start, int *stop, int *step, int *slicelength) ++_GetIndicesEx(PySliceObject *r, Py_ssize_t length, ++ Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength) + { + /* this is harder to get right than you might think */ + +- int defstart, defstop; ++ Py_ssize_t defstart, defstop; + + if (r->step == Py_None) { + *step = 1; +@@ -706,7 +706,7 @@ + self->nd = _snip( self->nd, self->dimensions, dim); + self->nstrides = _snip( self->nstrides, self->strides, dim); + } else if (PySlice_Check(slice)) { +- int start, stop, step, strided; ++ Py_ssize_t start, stop, step, strided; + if (_GetIndicesEx( (PySliceObject *) slice, + self->dimensions[dim], + &start, &stop, &step, &strided) < 0) +@@ -718,9 +718,9 @@ + Py_INCREF(Py_None); + return Py_None; + } +- self->byteoffset += self->strides[dim] * start; +- self->dimensions[dim] = strided; +- self->strides[dim] *= step; ++ self->byteoffset += (maybelong) (self->strides[dim] * start); ++ self->dimensions[dim] = (maybelong) strided; ++ self->strides[dim] *= (maybelong) step; + ++ dim; + } else { + Py_DECREF(rest); diff --git a/dev-python/numarray/numarray-1.5.2-r1.ebuild b/dev-python/numarray/numarray-1.5.2-r1.ebuild index fcf1dc335d3e..20df4ee5aee1 100644 --- a/dev-python/numarray/numarray-1.5.2-r1.ebuild +++ b/dev-python/numarray/numarray-1.5.2-r1.ebuild @@ -1,10 +1,10 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/numarray-1.5.2-r1.ebuild,v 1.7 2007/06/07 22:49:44 lavajoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/numarray/numarray-1.5.2-r1.ebuild,v 1.8 2007/10/15 18:46:45 bicatali Exp $ NEED_PYTHON=2.3 -inherit distutils fortran +inherit distutils DOC_PV=1.5 DESCRIPTION="Large array processing extension module for Python" @@ -12,13 +12,10 @@ SRC_URI="mirror://sourceforge/numpy/${P}.tar.gz doc? ( mirror://sourceforge/numpy/${PN}-${DOC_PV}.html.tar.gz )" HOMEPAGE="http://www.stsci.edu/resources/software_hardware/numarray" -# numarray does not work yet with other cblas implementations -# than cblas-reference or blas-atlas -RDEPEND="lapack? ( || ( >=sci-libs/blas-atlas-3.7.11-r1 - >=sci-libs/cblas-reference-20030223-r3 ) - virtual/lapack )" +RDEPEND="lapack? ( virtual/cblas virtual/lapack )" + DEPEND="${RDEPEND} - lapack? ( app-admin/eselect-cblas )" + lapack? ( dev-util/pkgconfig )" IUSE="doc lapack" SLOT="0" @@ -28,28 +25,21 @@ LICENSE="BSD" DOCS="LICENSE.txt Doc/*.txt Doc/release_notes/ANNOUNCE-${PV:0:3}" # test with lapack buggy on amd64 (at least) -RESTRICT="amd64? ( lapack? ( test ) )" +#RESTRICT="amd64? ( lapack? ( test ) )" -pkg_setup() { - if use lapack; then - FORTRAN="gfortran g77" - fortran_pkg_setup - 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 +use lapack && unset LDFLAGS + +# ex usage: pkgconf_cfg --libs-only-l cblas: ['cblas','atlas'] +pkgconf_cfg() { + local cfg="[" + for i in $(pkg-config "$@"); do + cfg="${cfg}'${i:2}'" + done + echo "${cfg//\'\'/','}]" } src_unpack() { - if use lapack; then - fortran_src_unpack - else - unpack ${A} - fi + unpack ${A} cd "${S}" # include Python.h from header files using the PyObject_HEAD macro. @@ -62,51 +52,34 @@ src_unpack() { # (i.e. need to include "__FreeBSD__" in pre-processor conditionals) epatch "${FILESDIR}"/${P}-freebsd.patch - # fix array_protocol tests with numpy - #sed -i \ - # -e 's/True/ True/g' \ - # Lib/array_protocol.py || die "sed array_protocol failed" + # fix only for python-2.5 (fix still uncomplete, see bug #191240) + distutils_python_version + [[ "${PYVER}" == 2.5 ]] && epatch "${FILESDIR}"/${P}-python25.patch # array_protocol tests are buggy with various numeric/numpy versions sed -i \ -e '/array_protocol/d' \ Lib/testall.py || die "sed testall failed" - # fix hard-coded path in numinclude - sed -i \ - -e "s:/home/jmiller/work/debug/include/python2.5:/usr/include/python${PYVER}:" \ - Lib/numinclude.py || die "sed numinclude failed" - # configure cfg_packages.py for lapack if use lapack; then sed -i \ - -e '/^if USE_LAPACK:/iUSE_LAPACK=True' \ - -e 's:/usr/local/include/atlas:/usr/include/atlas:g' \ - -e "s:/usr/local/lib/atlas:/usr/$(get_libdir):g" \ - -e 's:f77blas:blas:g' \ + -e '/^if USE_LAPACK:/iUSE_LAPACK = True' \ + -e "s:\['/usr/local/lib/atlas'\]:$(pkgconf_cfg --libs-only-L cblas lapack):g" \ + -e "s:\[\"/usr/local/include/atlas\"\]:$(pkgconf_cfg --cflags-only-I cblas lapack):g" \ + -e "s:\['lapack', 'cblas', 'f77blas', 'atlas', 'g2c', 'm'\]:$(pkgconf_cfg --libs-only-l cblas lapack):g" \ cfg_packages.py || die "sed for lapack failed" - # fix gfortran for > gcc-4 - if [[ "${FORTRANC}" == gfortran ]]; then - sed -i \ - -e "s:g2c:gfortran:g" \ - cfg_packages.py || die "sed for gfortran failed" - fi - if [[ "${mycblas}" == reference ]]; then - sed -i \ - -e "s:'atlas',::g" \ - -e "s:include/atlas:include/cblas:g" \ - cfg_packages.py || die "sed for reference lapack failed" - fi fi - ${python} setup.py config --gencode || die "API code generation failed" + + "${python}" setup.py config --gencode || die "API code generation failed" } src_test() { cd build/lib* cp "${S}"/Lib/testdata.fits numarray PYTHONPATH=. "${python}" -c \ - "from numarray.testall import test;import sys;sys.exit(test())" \ - > test.log + "from numarray.testall import test;import sys;sys.exit(test())" 2>&1 \ + | tee test.log grep -q -i failed test.log && die "failed tests in ${PWD}/test.log" rm -f numarray/testdata.fits test*.* } @@ -115,7 +88,7 @@ src_install() { distutils_src_install if use doc; then insinto /usr/share/doc/${PF} - doins -r Examples - dohtml ${WORKDIR}/${PN}-${DOC_PV}/* || die "dohtml failed" + doins -r Examples || die "install examples failed" + dohtml "${WORKDIR}"/${PN}-${DOC_PV}/* || die "dohtml failed" fi } |