summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2014-10-21 08:03:22 +0000
committerJustin Lecher <jlec@gentoo.org>2014-10-21 08:03:22 +0000
commit15ee2f82ac0136ad83d58b7d038bf703a55dd0f8 (patch)
treebda0edfe4e8101a67e1c9451ff4391400e27aed5 /dev-python/numpy
parentVersion bump. (diff)
downloadhistorical-15ee2f82ac0136ad83d58b7d038bf703a55dd0f8.tar.gz
historical-15ee2f82ac0136ad83d58b7d038bf703a55dd0f8.tar.bz2
historical-15ee2f82ac0136ad83d58b7d038bf703a55dd0f8.zip
dev-python/numpy: Backport fix for problems with -OO
Package-Manager: portage-2.2.14/cvs/Linux x86_64 Manifest-Sign-Key: 0xB9D4F231BD1558AB!
Diffstat (limited to 'dev-python/numpy')
-rw-r--r--dev-python/numpy/ChangeLog8
-rw-r--r--dev-python/numpy/Manifest26
-rw-r--r--dev-python/numpy/files/numpy-1.9.0-OO.patch91
-rw-r--r--dev-python/numpy/numpy-1.9.0-r1.ebuild148
4 files changed, 271 insertions, 2 deletions
diff --git a/dev-python/numpy/ChangeLog b/dev-python/numpy/ChangeLog
index 827e99f02213..1eaafc60cde2 100644
--- a/dev-python/numpy/ChangeLog
+++ b/dev-python/numpy/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/numpy
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.241 2014/10/19 10:26:34 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/ChangeLog,v 1.242 2014/10/21 08:03:21 jlec Exp $
+
+*numpy-1.9.0-r1 (21 Oct 2014)
+
+ 21 Oct 2014; Justin Lecher <jlec@gentoo.org> +numpy-1.9.0-r1.ebuild,
+ +files/numpy-1.9.0-OO.patch:
+ Backport fix for problems with -OO
*numpy-1.9.0 (19 Oct 2014)
diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
index 3e182a4d0162..a0924fdf2427 100644
--- a/dev-python/numpy/Manifest
+++ b/dev-python/numpy/Manifest
@@ -1,5 +1,9 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA512
+
AUX numpy-1.8.0-f2py-insecure-temporary.patch 7232 SHA256 3e10992bcb67bedb61d07c6679e66b02de4e0cde5cb7c60034a5aafdaab9f337 SHA512 509e75d3c0a0c0afcbd57545078fb3cbc3ec611429560b9f70529a9dfb36ec13a942e3cf8ae39463be36fc5bcd6aee68445559e03801cc11ccca3a69ccf556f0 WHIRLPOOL 3653cf024f8f2c67704e3ca2501553437a41103bf2b87a1c0f43e1bd4a8364ae90a6322fa59971b26dd488a62de4fccad1109ea5059fd8ac1226c7319dfa9011
AUX numpy-1.8.0-no-hardcode-blas.patch 1153 SHA256 ad79d788189db97178b73f019a47c502bb9297ae7a1b248da878f3f91ab8af3b SHA512 baa29a0c981ede608d890e776026961fb71156eb7804f702623bce775e3b6ce3bb28ced252d9c6fe991429b690b3eef8468d703f79247820527648d6484d23f3 WHIRLPOOL 38db4618b8fe505b711270b9050c56c1541c2fc3094b02ef6a45e776d56f54fd82b79ddc1b65721e0ac08949c6b9354da8c6ae0437b77e3b474ca941d44de9bb
+AUX numpy-1.9.0-OO.patch 2982 SHA256 4e286ed06bcf3958738a58da16a6b88b7ca461ff51f6df3cd55b6149e1016e53 SHA512 b6cea5d12807e063939863368533695148d93f6cf504dac621900ca92a19d817cfc3333381de310f1248575a7b8e1967c92dae9a43cd5344d26b46525b7bea0a WHIRLPOOL 50cd53ef5b478e2c93323569bb818ecc95519ca7f876cf67f947498d69c6da56eb029cafc4251267e1d65013d4ddf959f8d0f1f9075418f18252f91cc423434e
AUX numpy-1.9.0-no-hardcode-blas.patch 1201 SHA256 8ad1ddd7a7a5ea3c15b0a0bbd2c1a97c10bd0ef926a6c4b3f508173ac103e297 SHA512 1c97475c83f00053472483056278f82605329cb4cd66c406941e93fce9f6c3fbfb0cf763e74faf3b901ad06a7f31ecbb35e1b8a6fd8a634799a6088c1871a589 WHIRLPOOL cbc24881adc53d7c8bf4c4cac0ea813f2594450331a460b03f88caeca48fdf121f13974019a40bdd15dff9c8985615029e1933c9d25217241628846b73b13355
DIST numpy-1.8.0.tar.gz 3779617 SHA256 2764d0819acc77e9ff81b060fe7f69530b0d85c26ac9d162639b787cb227d253 SHA512 ec3d002ed786335e8748983261c96f88a9f1520fc345ad5b810dc02a5e126e15fe5afb02bed1f4b43d580a1da39583d86b84f57dc456b0702653e34e5357c857 WHIRLPOOL 8796d90795ddec62e6d72be433ea00917a63ef39cf3fe81e094f653e1863b69ecdce812995877f78e4324434141b03e2ceb3f872ed4e023b19c6bd9bcc294ac2
DIST numpy-1.8.1.tar.gz 3794076 SHA256 3d722fc3ac922a34c50183683e828052cd9bb7e9134a95098441297d7ea1c7a9 SHA512 39ef9e13f8681a2c2ba3d74ab96fd28c5669e653308fd1549f262921814fa7c276ce6d9fb65ef135006584c608bdf3db198d43f66c9286fc7b3c79803dbc1f57 WHIRLPOOL 10615c0c70c153156034447e9c3f2b70b0259173a44af3b5cc641dd31c0af71ef1053a9cc7938deff5edb899ae2666b2b3109491d7394f03d1a81cb19722d398
@@ -14,6 +18,26 @@ DIST numpy-user-1.8.1.pdf 408305 SHA256 be827f2d92ef86c3af7f59c623017e7bc23ee95c
EBUILD numpy-1.8.0-r1.ebuild 4065 SHA256 4eaa79959b08194a35ad004af8a1b9d7f80283e785b2343f28417fe4b8f72a35 SHA512 a139d97ba12d88d6620d0f6c675f3ee3672ce8ad6ab32152c0d4b3c877549e1646088b5084bab9da8d6cc55e3b33acf91d7ca8240b8c51c239a397e854e43b4a WHIRLPOOL 4b0acb4066e81e5c772e87ac70389e5ac1b4b7a2a814602536f3c68909204727c93bd49b1dc4795525694de7154f44cccf72cc37e054fdea722e851be3e4b8e7
EBUILD numpy-1.8.1.ebuild 3987 SHA256 4a5ba6155429bc3d9a0fef97c565d504d02ea500e07a1a7edc5f683f2867cc61 SHA512 06c2ec9109510f2196f84f00b23a23395e71c75e17258d520571af014e0db330ed23b503ae081467136064657bb0cd64583c902d8c8d5fefe1356b955d528802 WHIRLPOOL 2c080a308f438be0dc0880539dcf144b0f3e38526c2b40b42f1c7b1a6a8ef1e54841bd75a18416b3530ca2c6b644a58f4b026c35aff3c6bddf41116e7fff4a3b
EBUILD numpy-1.8.2.ebuild 4075 SHA256 0dc561d89bc1f8fc57566dfbacb97427c5461699d77a3df6dc8fa1e49723de56 SHA512 d063ce8d8e0935b66da9fb509ef7ab2273c37bd314fb3f7a93e7de3b64b5f9d8551483eb827978c0283a2866380610a4fd60cf99dac888c9065f239846c8ddd0 WHIRLPOOL 5d501b3fc985fb2d5dbfc610c6e3c45332fcb500974eb766e0c7cf69a288e50a1cc7654e0a32bd24e2732e223e506010f2665536c671fd0e4d1813d635e32945
+EBUILD numpy-1.9.0-r1.ebuild 4219 SHA256 46422537f329f32ce0896f3cc6846068aae0623a0404fe634e56cbbb7891d785 SHA512 cc0cb2f159adf8526eed95c6ebeaa26e4330da0249f6b727403f0ff41efed093a2a55c25bffa1530b879b0d53cbf1d0d6ed99ee0b79f559c77838f8e335655ae WHIRLPOOL cea348043dafc2155b6bee8536475b828831ec11b5f727be05ff125f1a136733fe2c76cab0b9ad22b3768b00cba7efcf9f8e9995d762b892d72a1314864aa0c6
EBUILD numpy-1.9.0.ebuild 4095 SHA256 861cd76de3bcb4f6d0b57e33a70c86141015e760f8aa515ef84b62b883cb1947 SHA512 e554428287c726b1470081ce6d12f770141dc97469b1a40cfd972f4454d2683d9a4ee92a7ef98bc4dac2e2369820a33b50a513074728faac46f309620f109b52 WHIRLPOOL 1a24e5a4a06393b969369f12dc7b797ca8b329a4499838517baae1472f7cf5b663eb4e841aaadb66d3612617fe82f3568c5e369c5b51485737bb85c196f1464d
-MISC ChangeLog 33556 SHA256 10a9c5be9d8b95b29b65079f8ecae7b8c97fd75132a84c582db856021fb98d98 SHA512 2a28982e9c69441ddfe577ec390a065fa37bd03d911c59bec52aa9bff0d2716566860ee5226774df1a7f464751f4b0e47dc7f256ffadbe629995f3c07f0c9723 WHIRLPOOL 5eda978535db5c70581765da2983eefefdbf744384b92b0fd85fafcbd2195518091323917a7ad534d702f73cadf6ed11d4b9c43f8559b8d233a3a209a2b00a53
+MISC ChangeLog 33724 SHA256 25583e05fe1f700e91a475e301542b58c385d8344a9bbd4dbd91bdebe8657f3e SHA512 0c2f706a4c9cd9a6f0a45c3e95b61a92aa9a971cc66c93684f3b4e2264d2edde1b4fc2f96d34a1af1cdc1cf40de1db5fe75ef3b7fbd18af08a3e5f8e5bdd2a29 WHIRLPOOL 554815a4cb3a3f2401b7ec305f7377c44fe83033e54892e85e3b9fd4b7d2564e03304a3bf44a515173ca971c5c28871d93e1d0f44e4b2682425bea9d7a95d1b6
MISC metadata.xml 690 SHA256 9c315188497956a9b1e2a1373f7830f702cf9b588aabc33a3f5547ab75b20a84 SHA512 1adcf955fdc7f06b56a69c6345b79a4fb0ca0df17cfdcd1f3604a234389534f8f00b88ebddb3e47a39d563d7374d40349c3e4050799a31405446a1629f8c7698 WHIRLPOOL e2b34ab0b391c99a279dd11de292aafd9225f9743ec3bafafd980edb7522e772cde461705d5394569aa8dd73e72a210560eb50a23b2334ab5c12ec064099abd1
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0
+
+iQJ8BAEBCgBmBQJURhNKXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
+ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyQ0JDQjFGMzBDQ0UxMjFGNENDNDgxMDdC
+OUQ0RjIzMUJEMTU1OEFCAAoJELnU8jG9FVirNeQQAJgasf+/lRxKw32HsiR7MJqi
+AJGUKLiw6H8EFikyt4R7M8nMHsfFwmC5039ByJKQNe4xdDxfWMlW3P0FSre84rdK
+ajccgjFEOGytUcLhYiChny7ej9sbrbftY80FGxbkphbX4czO97AH0eBqSPOjHCt9
+XPi74ylRONiyH2/XPem34XwBbwp/FZEFUY0eyiCvVDQRC6wESsJxCRoxIzeFcaR1
+y2s17J/Wmc/hPGbX9B7NM6Vt88d6ZBF4X80jExPnXS+kgl5a0SuUJ18nIvU3AZ4N
+zrZd1PxoOQpXe0nO+yexl2nxQ0mWeawphswV63fBq3aJWx5Tjqd107U9Ydb7cxUR
+eLIeGxyrfq9CyecT+wMU78sy+tqFfovW0u3du2gTma4aSrs/+ie50gNe5YXSCEkN
+Vh3goV5Z+fdDTBCZ4cpLhqli5788ilU2iNGp7pCEc5H8uUWQb/cbGByC37I8cOhM
+fPO5lN7tg7kA9c5nvGUU51A9j8IVluTnqJR3nOCs++JAsch2mjp3+MTge8zn/5eT
+MrUQ09M2j3vmgNE45MdBdbQcDp/kgeJwS/Xz9Cd/U8sAmImqVjs3gSGq4kdZ1mW/
+DynnAAmB0X+Mjw0l406/Xl0Auvrub11tugJuwFx8uP7bVM5wCrQPH3xjIWZ1gJ3f
+94knoXTP86iA6RpKAPOA
+=hGCR
+-----END PGP SIGNATURE-----
diff --git a/dev-python/numpy/files/numpy-1.9.0-OO.patch b/dev-python/numpy/files/numpy-1.9.0-OO.patch
new file mode 100644
index 000000000000..f1ebc23e1577
--- /dev/null
+++ b/dev-python/numpy/files/numpy-1.9.0-OO.patch
@@ -0,0 +1,91 @@
+From dc453917978e98dcdf3bbc106b080c80f0a1301e Mon Sep 17 00:00:00 2001
+From: Charles Harris <charlesr.harris@gmail.com>
+Date: Fri, 3 Oct 2014 20:03:31 -0600
+Subject: [PATCH] BUG: Make numpy import when run with Python flag '-OO'.
+
+This consists of checking for a docstring equal to None and skipping two
+tests that require docstrings.
+
+Closes #5148.
+---
+ numpy/lib/tests/test_function_base.py | 6 +++++-
+ numpy/lib/tests/test_utils.py | 3 ++-
+ numpy/ma/extras.py | 8 +++++---
+ 3 files changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
+index ee38b35..a3f8056 100644
+--- a/numpy/lib/tests/test_function_base.py
++++ b/numpy/lib/tests/test_function_base.py
+@@ -1,12 +1,14 @@
+ from __future__ import division, absolute_import, print_function
+
+ import warnings
++import sys
+
+ import numpy as np
+ from numpy.testing import (
+ run_module_suite, TestCase, assert_, assert_equal, assert_array_equal,
+ assert_almost_equal, assert_array_almost_equal, assert_raises,
+- assert_allclose, assert_array_max_ulp, assert_warns, assert_raises_regex
++ assert_allclose, assert_array_max_ulp, assert_warns,
++ assert_raises_regex, dec
+ )
+ from numpy.random import rand
+ from numpy.lib import *
+@@ -2094,6 +2096,8 @@ def test_string_arg(self):
+
+
+ class TestAdd_newdoc(TestCase):
++
++ @dec.skipif(sys.flags.optimize == 2)
+ def test_add_doc(self):
+ # test np.add_newdoc
+ tgt = "Current flat index into the array."
+diff --git a/numpy/lib/tests/test_utils.py b/numpy/lib/tests/test_utils.py
+index fcb37f9..8fbd1c4 100644
+--- a/numpy/lib/tests/test_utils.py
++++ b/numpy/lib/tests/test_utils.py
+@@ -3,7 +3,7 @@
+ import sys
+ from numpy.core import arange
+ from numpy.testing import (
+- run_module_suite, assert_, assert_equal
++ run_module_suite, assert_, assert_equal, dec
+ )
+ from numpy.lib import deprecate
+ import numpy.lib.utils as utils
+@@ -14,6 +14,7 @@
+ from StringIO import StringIO
+
+
++@dec.skipif(sys.flags.optimize == 2)
+ def test_lookfor():
+ out = StringIO()
+ utils.lookfor('eigenvalue', module='numpy', output=out,
+diff --git a/numpy/ma/extras.py b/numpy/ma/extras.py
+index 82a61a6..a993fd0 100644
+--- a/numpy/ma/extras.py
++++ b/numpy/ma/extras.py
+@@ -434,8 +434,10 @@ def apply_over_axes(func, a, axes):
+ raise ValueError("function is not returning "
+ "an array of the correct shape")
+ return val
+-apply_over_axes.__doc__ = np.apply_over_axes.__doc__[
+- :np.apply_over_axes.__doc__.find('Notes')].rstrip() + \
++
++if apply_over_axes.__doc__ is not None:
++ apply_over_axes.__doc__ = np.apply_over_axes.__doc__[
++ :np.apply_over_axes.__doc__.find('Notes')].rstrip() + \
+ """
+
+ Examples
+@@ -462,7 +464,7 @@ def apply_over_axes(func, a, axes):
+ [[[46]
+ [--]
+ [124]]]
+-"""
++ """
+
+
+ def average(a, axis=None, weights=None, returned=False):
diff --git a/dev-python/numpy/numpy-1.9.0-r1.ebuild b/dev-python/numpy/numpy-1.9.0-r1.ebuild
new file mode 100644
index 000000000000..e197980768c4
--- /dev/null
+++ b/dev-python/numpy/numpy-1.9.0-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/numpy/numpy-1.9.0-r1.ebuild,v 1.1 2014/10/21 08:03:21 jlec Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} )
+
+FORTRAN_NEEDED=lapack
+
+inherit distutils-r1 eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator
+
+DOC_PV="1.8.1"
+DOC_P="${PN}-${DOC_PV}"
+
+DESCRIPTION="Fast array and numerical python library"
+HOMEPAGE="http://numpy.scipy.org/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
+ doc? (
+ http://docs.scipy.org/doc/${DOC_P}/${PN}-html-${DOC_PV}.zip
+ http://docs.scipy.org/doc/${DOC_P}/${PN}-ref-${DOC_PV}.pdf
+ http://docs.scipy.org/doc/${DOC_P}/${PN}-user-${DOC_PV}.pdf
+ )"
+# It appears the docs haven't been upgraded, still @ 1.8.1
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
+IUSE="doc lapack test"
+
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
+ lapack? ( virtual/cblas virtual/lapack )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ lapack? ( virtual/pkgconfig )
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+# Uses distutils.command.config.
+DISTUTILS_IN_SOURCE_BUILD=1
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.9.0-no-hardcode-blas.patch
+ # https://github.com/numpy/numpy/commit/dc453917978e98dcdf3bbc106b080c80f0a1301e.patch
+ "${FILESDIR}"/${PN}-1.9.0-OO.patch
+)
+
+src_unpack() {
+ default
+ if use doc; then
+ unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
+ fi
+}
+
+pc_incdir() {
+ $(tc-getPKG_CONFIG) --cflags-only-I $@ | \
+ sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
+}
+
+pc_libdir() {
+ $(tc-getPKG_CONFIG) --libs-only-L $@ | \
+ sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||'
+}
+
+pc_libs() {
+ $(tc-getPKG_CONFIG) --libs-only-l $@ | \
+ sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \
+ -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \
+ | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||'
+}
+
+python_prepare_all() {
+ if use lapack; then
+ append-ldflags "$($(tc-getPKG_CONFIG) --libs-only-other cblas lapack)"
+ local libdir="${EPREFIX}"/usr/$(get_libdir)
+ # make sure _dotblas.so gets built
+ sed -i -e '/NO_ATLAS_INFO/,+1d' numpy/core/setup.py || die
+ cat >> site.cfg <<-EOF
+ [blas]
+ include_dirs = $(pc_incdir cblas)
+ library_dirs = $(pc_libdir cblas blas):${libdir}
+ blas_libs = $(pc_libs cblas blas)
+ [lapack]
+ library_dirs = $(pc_libdir lapack):${libdir}
+ lapack_libs = $(pc_libs lapack)
+ EOF
+ else
+ export {ATLAS,PTATLAS,BLAS,LAPACK,MKL}=None
+ fi
+
+ export CC="$(tc-getCC) ${CFLAGS}"
+
+ append-flags -fno-strict-aliasing
+
+ # 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
+ append-fflags -fPIC
+ if use lapack; then
+ NUMPY_FCONFIG="config_fc --noopt --noarch"
+ # workaround bug 335908
+ [[ $(tc-getFC) == *gfortran* ]] && NUMPY_FCONFIG+=" --fcompiler=gnu95"
+ fi
+
+ # don't version f2py, we will handle it.
+ sed -i -e '/f2py_exe/s:+os\.path.*$::' numpy/f2py/setup.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_compile() {
+ distutils-r1_python_compile ${NUMPY_FCONFIG}
+}
+
+python_test() {
+ distutils_install_for_testing ${NUMPY_FCONFIG}
+
+ cd "${TMPDIR}" || die
+ ${EPYTHON} -c "
+import numpy, sys
+r = numpy.test(label='full', verbose=3)
+sys.exit(0 if r.wasSuccessful() else 1)" || die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+ distutils-r1_python_install ${NUMPY_FCONFIG}
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+
+ dodoc COMPATIBILITY DEV_README.txt THANKS.txt
+
+ if use doc; then
+ dohtml -r "${WORKDIR}"/html/*
+ dodoc "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf
+ fi
+
+ # absent in 1.9
+ #docinto f2py
+ #dodoc numpy/f2py/docs/*.txt
+ #doman numpy/f2py/f2py.1
+}