commit: 8312da3860c9f396691ecbd2bcb1129240d60882
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 5 10:54:30 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 5 10:55:47 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8312da38
sci-libs/scipy: Fix running tests
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
sci-libs/scipy/scipy-1.4.1.ebuild | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/sci-libs/scipy/scipy-1.4.1.ebuild
b/sci-libs/scipy/scipy-1.4.1.ebuild
index 5de99c92dbd..42e1b169419 100644
--- a/sci-libs/scipy/scipy-1.4.1.ebuild
+++ b/sci-libs/scipy/scipy-1.4.1.ebuild
@@ -21,9 +21,9 @@ SRC_URI="
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 )"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos
~x86-macos"
CDEPEND="
>=dev-python/numpy-1.10[lapack,${PYTHON_USEDEP}]
@@ -99,6 +99,10 @@ python_prepare_all() {
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
@@ -118,13 +122,11 @@ python_compile() {
python_test() {
# fails with bdist_egg. should it be fixed in distutils-r1 eclass?
distutils_install_for_testing ${SCIPY_FCONFIG}
- cd "${TEST_DIR}" || die "no ${TEST_DIR} available"
- "${PYTHON}" -c \
- 'import numpy as np; print("relaxed strides checking:",
np.ones((10,1),order="C").flags.f_contiguous)' \
- || die
- "${EPYTHON}" -c \
- "import scipy, sys; r = scipy.test('fast', verbose=2);
sys.exit(r)" \
- || die "Tests fail with ${EPYTHON}"
+ 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() {