dev-python/scipy: Bump to 1.5.4

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2020-11-05 12:06:29 +01:00
parent 9e2dfd6125
commit 8b1f78641b
2 changed files with 163 additions and 0 deletions

View File

@@ -10,3 +10,6 @@ DIST scipy-1.5.2.tar.gz 25423944 BLAKE2B 0a4987da0cde4f33bbb0e2be571b59e9064b1c6
DIST scipy-1.5.3-html.zip 23172844 BLAKE2B eb90cb6d54ff1a6afeff387baccc273df4491a5d37202afa2a8dcebc29ecacf11784e2427fd9b91db954d13c418dae26619d172487515747f49ef6e41f793310 SHA512 cd7131efeccef2095955a3f6d5260d6f3d6d038668d686e556acf87f7aa4d85df576474b4feb7939c3eba51e81dc264590813483427db22038a09164f44f75b0
DIST scipy-1.5.3-ref.pdf 33463958 BLAKE2B 58939157eb5473278e1cde11a992082824e23220a83c6b3b87f219a12d7449a2290ce845e62d04fdbffb58ab9f6598da153b9ab75a139a071944e73738f19a1f SHA512 66dcb4e507f3f29ad82cc989e93dabe55e7c8147795ed8ed419c15ab50b0d6612e63dd918cab0640ab2085c68b1d14a3981d6da089baa4b4c2d302846aa4c496
DIST scipy-1.5.3.tar.gz 25234560 BLAKE2B 734f29b7e3f6591b265ec43e173d1303683e2fcfa493cc03d71222fb34ccbc1bb6498d0a9c814d7cb3b08f8d82f06829a2280e46bab733f1c4d6c57742555d70 SHA512 ac65196179663905cf813e023cbbc4c0ef42948425d8190db9218339e23dc3a53e788759f0d7bb986395f8b86f6e97f5de87704ef70445d9f9c10c4ceee8e104
DIST scipy-1.5.4-html.zip 23175279 BLAKE2B 79cf621daa4c41414cd6d52364481ff5df4a21232bc37a5c60f9e63b60e9ad9b07a1603865fd60b2041375ae12791d761fe5d3cbd1f5c0977a37e8bf497c1e3c SHA512 eb93b2ae1dcb916bfbe77ac0ccb7f7f66af3ad3965d397c84dfbc725af08060dccf3fb0988961bf2051f0236c64066dd28f01d85484babb3ee997a9d0bab8069
DIST scipy-1.5.4-ref.pdf 33467477 BLAKE2B d7a110258d6fe0430c380b34e2053b6b0ef8da7a6b3bee35314d55beae887afb32d01479f1ad6b8bf6847c2225890c20c118e3fd692dae55292793f38b484a9d SHA512 7f98b5014553f73880fe18d942684b8282c6aefb90b329865b65d45cfa0cffac0a8808e970af291a96e4d326ec8b284dc4385ffa5469049b4f643be8642329e7
DIST scipy-1.5.4.tar.gz 25237512 BLAKE2B 719cfecd6794b037dc636793ba38a3b39f5fd1a44ce2fd2cf2418b0ca6d1a7898b34c4cf684752fdde635107744773c796b998418d5a983450b70beb461e32df SHA512 d23f68911a8880f87767819750d4d175ba8f9c72fcb9b8080305ee65722c046d4485fde4f0c85cc53c46247dd99813afe675a38b3b0569a683ddc2c2e021b8fc

View File

@@ -0,0 +1,160 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python3_{6..9} )
PYTHON_REQ_USE="threads(+)"
DOC_PV=${PV}
inherit fortran-2 distutils-r1 flag-o-matic multiprocessing toolchain-funcs
DESCRIPTION="Scientific algorithms library for Python"
HOMEPAGE="https://www.scipy.org/"
SRC_URI="
mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
doc? (
https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${PV}.zip -> ${PN}-${DOC_PV}-html.zip
https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${PV}.pdf -> ${PN}-${DOC_PV}-ref.pdf
)"
LICENSE="BSD LGPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
IUSE="doc sparse test"
RESTRICT="!test? ( test )"
CDEPEND="
>=dev-python/numpy-1.10[lapack,${PYTHON_USEDEP}]
sci-libs/arpack:0=
virtual/cblas
virtual/lapack
sparse? ( sci-libs/umfpack:0= )"
DEPEND="${CDEPEND}
dev-lang/swig
>=dev-python/cython-0.29.13[${PYTHON_USEDEP}]
>=dev-python/setuptools-36[${PYTHON_USEDEP}]
dev-python/pybind11[${PYTHON_USEDEP}]
virtual/pkgconfig
doc? ( app-arch/unzip )
test? (
dev-python/nose[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
)"
RDEPEND="${CDEPEND}
dev-python/pillow[${PYTHON_USEDEP}]"
DOCS=( HACKING.rst.txt THANKS.txt )
DISTUTILS_IN_SOURCE_BUILD=1
src_unpack() {
default
if use doc; then
unzip -qo "${DISTDIR}"/${PN}-${DOC_PV}-html.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() {
# scipy automatically detects libraries by default
export {FFTW,FFTW3,UMFPACK}=None
use sparse && unset UMFPACK
# the missing symbols are in -lpythonX.Y, but since the version can
# differ, we just introduce the same scaryness as on Linux/ELF
[[ ${CHOST} == *-darwin* ]] \
&& append-ldflags -bundle "-undefined dynamic_lookup" \
|| append-ldflags -shared
[[ -z ${FC} ]] && export FC="$(tc-getFC)"
# hack to force F77 to be FC until bug #278772 is fixed
[[ -z ${F77} ]] && export F77="$(tc-getFC)"
export F90="${FC}"
export SCIPY_FCONFIG="config_fc --noopt --noarch"
append-fflags -fPIC
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
cat >> setup.cfg <<-EOF || die
[options]
zip_safe = False
EOF
# Drop hashes to force rebuild of cython based .c code
rm cythonize.dat || die
# TODO
sed -e 's:test_magic_square_sparse_no_presolve:_&:' \
-i scipy/optimize/tests/test_linprog.py || die
sed -e "s:== 'levy_stable':in ('levy_stable', 'crystalball', 'ncf'):" \
-i scipy/stats/tests/test_continuous_basic.py || die
distutils-r1_python_prepare_all
}
python_configure_all() {
# bug 721860
test-flag-FC -fallow-argument-mismatch &&
append-fflags -fallow-argument-mismatch
}
python_compile() {
# FIXME: parallel python building fails, bug #614464
export MAKEOPTS=-j1
${EPYTHON} tools/cythonize.py || die
distutils-r1_python_compile \
${SCIPY_FCONFIG}
}
python_test() {
# fails with bdist_egg. should it be fixed in distutils-r1 eclass?
distutils_install_for_testing ${SCIPY_FCONFIG}
cd "${TEST_DIR}/lib" || die "no ${TEST_DIR} available"
PYTHONPATH=. "${EPYTHON}" -c "
import scipy, sys
r = scipy.test('fast', verbose=2)
sys.exit(0 if r else 1)" || die "Tests fail with ${EPYTHON}"
}
python_install_all() {
use doc && \
local DOCS=( "${DISTDIR}"/${PN}-${DOC_PV}-ref.pdf ) \
local HTML_DOCS=( "${WORKDIR}"/html/. )
distutils-r1_python_install_all
}
python_install() {
distutils-r1_python_install ${SCIPY_FCONFIG}
python_optimize
}
pkg_postinst() {
elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER"
elog "to your prefered image viewer. Example:"
elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
}