Upgrade numpy to 1.16.0

This commit is contained in:
Andreas Billmeier 2019-01-26 09:42:36 +01:00
parent 2aaf0c4e12
commit 4edea9f24e
2 changed files with 146 additions and 0 deletions

View File

@ -3,7 +3,9 @@ AUX numpy-1.15.2-py37.patch 5417 BLAKE2B a6660b06a6f5ebc436b8bef4f53934892384889
DIST numpy-1.15.2.zip 4484511 BLAKE2B 35eead87706f2f3ab1f9e82a2f6816ef8c5015c611aff838a18dcd9fda49f1a20840a0f2a5c6cfc144118545f00a66c0b599c38600a63a454d1d95cdd4286d5f SHA512 6a2c9c5e67963558749e6468d79c7dc55f13749400640dbb7dea8c87a30c9cadb04df6b3cf3f92ac7d720486ef3f3c248ab4680b954e7adeb44edf2f2a072250
DIST numpy-1.15.3.zip 4487045 BLAKE2B e88c7822b8317e7c75f2f595a2c0fb057c0932e2bbdae0ce472a017d5ee4cac93d20028f74d3127dea28feee584d25d5176300ea6eab4e68bc6dca9168442fb3 SHA512 5d3e399c54c8ffacae3518011c5fba523b463a300a44c454c149c57365d2cfad370f292952c93ea0a98b3cdd4f67824b8d02ff4638106e57524f315ccb6a5c3c
DIST numpy-1.15.4.zip 4473522 BLAKE2B c030ef4a06c84091eec11b6602422468bd0674489a2c7fea1230132cd3a3ca1b10ec87eeb6788f2f263943f9ac43026dc1e7f0f5f1d52e9d1cc6934a5d361090 SHA512 9e0516da04368f0353fb7e3cc2c72e1ec936042908309732a298405bd7111e712899627b82f3674295b611e0ebfd74ef91d693f065fe9cb03dc7de23d1e72676
DIST numpy-1.16.0.zip 5052439 BLAKE2B 7cfd3efc651b9e10128c98bf4c2803afbfc84e69ae948f0d6ed086a2d1a61b4a566aad23851b743ba9b3f4bfe0c0e47f742daed65b6b9900d0b8eac74235274b SHA512 a252748c54b349319c8b8b69aae8f58853ac698a9ad0fb04fd1150db543910f25bc88bb3ca73d3d51d0658ab9379756870bc7b24bbaf58ffb8717d80366a4c52
EBUILD numpy-1.15.2.ebuild 3877 BLAKE2B ce683718bc111b9132bd478e4c30eec49e097a23bda87985991b6a6f1b35bbd2efe2c2c859a1a98772446e19faa30c199f9cb041874fc32da2f8acd9b9071c0c SHA512 c9ee0dedb44c3c0c23e7596fd3297f08073a7695aceddfebd09528be0e3f26e8750c612d85f1f37d77ccf24c801e22e78330c3e8e7036c551a31ee06c157a26a
EBUILD numpy-1.15.3.ebuild 3877 BLAKE2B ce683718bc111b9132bd478e4c30eec49e097a23bda87985991b6a6f1b35bbd2efe2c2c859a1a98772446e19faa30c199f9cb041874fc32da2f8acd9b9071c0c SHA512 c9ee0dedb44c3c0c23e7596fd3297f08073a7695aceddfebd09528be0e3f26e8750c612d85f1f37d77ccf24c801e22e78330c3e8e7036c551a31ee06c157a26a
EBUILD numpy-1.15.4.ebuild 3877 BLAKE2B ce683718bc111b9132bd478e4c30eec49e097a23bda87985991b6a6f1b35bbd2efe2c2c859a1a98772446e19faa30c199f9cb041874fc32da2f8acd9b9071c0c SHA512 c9ee0dedb44c3c0c23e7596fd3297f08073a7695aceddfebd09528be0e3f26e8750c612d85f1f37d77ccf24c801e22e78330c3e8e7036c551a31ee06c157a26a
EBUILD numpy-1.16.0.ebuild 3877 BLAKE2B ce683718bc111b9132bd478e4c30eec49e097a23bda87985991b6a6f1b35bbd2efe2c2c859a1a98772446e19faa30c199f9cb041874fc32da2f8acd9b9071c0c SHA512 c9ee0dedb44c3c0c23e7596fd3297f08073a7695aceddfebd09528be0e3f26e8750c612d85f1f37d77ccf24c801e22e78330c3e8e7036c551a31ee06c157a26a
MISC metadata.xml 252 BLAKE2B 507e0ddc9d50b879ff374b903b142f85d020dfd6c486aba2af84fe082c878e780edbb79188ae10104d57db0eb775c86814cc8c06891a3854c9da840a4d377050 SHA512 9470ac9c8a5a4f80e3f767e7aa198addc7b21866c63b2a310e9f41ce65817672fb77423117bdd619e99cb62322025aeadf50717e23eafabf99080fcc106820af

View File

@ -0,0 +1,144 @@
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} )
PYTHON_REQ_USE="threads(+)"
FORTRAN_NEEDED=lapack
inherit distutils-r1 flag-o-matic fortran-2 multiprocessing toolchain-funcs
DOC_PV="${PV}"
DOC_P="${PN}-${DOC_PV}"
DESCRIPTION="Fast array and numerical python library"
HOMEPAGE="https://www.numpy.org"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.zip"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
IUSE="doc lapack test"
RDEPEND="lapack? ( virtual/cblas virtual/lapack )"
DEPEND="${RDEPEND}
app-arch/unzip
dev-python/setuptools[${PYTHON_USEDEP}]
lapack? ( virtual/pkgconfig )
test? ( >=dev-python/nose-1.0[${PYTHON_USEDEP}] )"
PATCHES=(
# "${FILESDIR}"/${PN}-1.14.5-no-hardcode-blas.patch
# backport a fix for py3.7 test failures
# "${FILESDIR}"/numpy-1.14.5-py37.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)
cat >> site.cfg <<-EOF || die
[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
# we don't have f2py-3.3
sed \
-e 's:test_f2py:_&:g' \
-i numpy/tests/test_scripts.py || die
distutils-r1_python_prepare_all
}
python_compile() {
export MAKEOPTS=-j1 # bug #660754
local python_makeopts_jobs=""
python_is_python3 || python_makeopts_jobs="-j $(makeopts_jobs)"
distutils-r1_python_compile \
${python_makeopts_jobs} \
${NUMPY_FCONFIG}
}
python_test() {
distutils_install_for_testing --single-version-externally-managed --record "${TMPDIR}/record.txt" ${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() {
local DOCS=( THANKS.txt )
if use doc; then
local HTML_DOCS=( "${WORKDIR}"/html/. )
DOCS+=( "${DISTDIR}"/${PN}-{user,ref}-${DOC_PV}.pdf )
fi
distutils-r1_python_install_all
}