-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
DOC_PV=${PV}
-inherit eutils fortran-2 distutils-r1 flag-o-matic git-r3 multilib toolchain-funcs
+inherit eutils fortran-2 distutils-r1 flag-o-matic git-r3 multilib multiprocessing toolchain-funcs
DESCRIPTION="Scientific algorithms library for Python"
HOMEPAGE="https://www.scipy.org/"
IUSE="sparse test"
CDEPEND="
- >=dev-python/numpy-1.6.2[lapack,${PYTHON_USEDEP}]
+ >=dev-python/numpy-1.10[lapack,${PYTHON_USEDEP}]
sci-libs/arpack:0=
virtual/cblas
virtual/lapack
DISTUTILS_IN_SOURCE_BUILD=1
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.12.0-blitz.patch
+ "${FILESDIR}"/${PN}-0.12.0-restore-sys-argv.patch
+)
+
pc_incdir() {
$(tc-getPKG_CONFIG) --cflags-only-I $@ | \
sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||'
lapack_libs = $(pc_libs lapack)
EOF
- local PATCHES=(
- "${FILESDIR}"/${PN}-0.12.0-blitz.patch
- "${FILESDIR}"/${PN}-0.12.0-restore-sys-argv.patch
- )
distutils-r1_python_prepare_all
}
python_compile() {
${EPYTHON} tools/cythonize.py || die
- distutils-r1_python_compile ${SCIPY_FCONFIG}
+ distutils-r1_python_compile -j $(makeopts_jobs) ${SCIPY_FCONFIG}
}
python_test() {
"${PYTHON}" -c \
'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \
|| die
+ # https://github.com/scipy/scipy/issues/5426
"${EPYTHON}" -c \
- "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \
+ "import scipy, sys; r = scipy.test('fast', verbose=2, raise_warnings='release'); sys.exit(0 if r.wasSuccessful() else 1)" \
|| die "Tests fail with ${EPYTHON}"
-}
-
-python_install_all() {
- if use doc; then
- dodoc "${DISTDIR}"/${PN}*pdf
- docinto html
- dodoc -r "${WORKDIR}"/html/.
- fi
- distutils-r1_python_install_all
+# "${EPYTHON}" -c \
+# "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \
+# || die "Tests fail with ${EPYTHON}"
}
python_install() {