* [gentoo-commits] repo/gentoo:master commit in: dev-python/scipy/files/, dev-python/scipy/
@ 2021-11-05 5:56 Sam James
0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2021-11-05 5:56 UTC (permalink / raw
To: gentoo-commits
commit: d1291d92a0979e9227bbd81d4db6076ea08dddef
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 5 05:43:30 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 5 05:56:48 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1291d92
dev-python/scipy: add upstream fix for 32-bit test failures (pythran)
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/scipy-1.7.1-pythran-tests-32-bit.patch | 31 ++++++++++++++++++++++
.../{scipy-1.7.1.ebuild => scipy-1.7.1-r1.ebuild} | 4 +++
2 files changed, 35 insertions(+)
diff --git a/dev-python/scipy/files/scipy-1.7.1-pythran-tests-32-bit.patch b/dev-python/scipy/files/scipy-1.7.1-pythran-tests-32-bit.patch
new file mode 100644
index 00000000000..206d1d9fa3b
--- /dev/null
+++ b/dev-python/scipy/files/scipy-1.7.1-pythran-tests-32-bit.patch
@@ -0,0 +1,31 @@
+https://github.com/scipy/scipy/commit/5b3a3b440525aa5038e2cead1f9b4f23a610cd9f
+
+From: serge-sans-paille <serge.guelton@telecom-bretagne.eu>
+Date: Sun, 18 Jul 2021 11:14:29 +0200
+Subject: [PATCH] Extra pythran annotation for i686 support
+
+Bug spotted on Fedora, see https://src.fedoraproject.org/rpms/scipy/pull-request/22
+
+The `int[::]` annotation is used to accept non-contiguous views.
+--- a/scipy/optimize/_group_columns.py
++++ b/scipy/optimize/_group_columns.py
+@@ -54,6 +54,8 @@ def group_dense(m, n, A):
+
+ #pythran export group_sparse(int, int, intc[], intc[])
+ #pythran export group_sparse(int, int, int[], int[])
++#pythran export group_sparse(int, int, intc[::], intc[::])
++#pythran export group_sparse(int, int, int[::], int[::])
+ def group_sparse(m, n, indices, indptr):
+ groups = -np.ones(n, dtype=np.intp)
+ current_group = 0
+--- a/scipy/signal/_max_len_seq_inner.py
++++ b/scipy/signal/_max_len_seq_inner.py
+@@ -4,6 +4,7 @@
+ import numpy as np
+
+ #pythran export _max_len_seq_inner(intp[], int8[], int, int, int8[])
++#pythran export _max_len_seq_inner(int[], int8[], int, int, int8[])
+
+ # Fast inner loop of max_len_seq.
+ def _max_len_seq_inner(taps, state, nbits, length, seq):
+
diff --git a/dev-python/scipy/scipy-1.7.1.ebuild b/dev-python/scipy/scipy-1.7.1-r1.ebuild
similarity index 98%
rename from dev-python/scipy/scipy-1.7.1.ebuild
rename to dev-python/scipy/scipy-1.7.1-r1.ebuild
index ed5e007e4e2..0ef732f5b19 100644
--- a/dev-python/scipy/scipy-1.7.1.ebuild
+++ b/dev-python/scipy/scipy-1.7.1-r1.ebuild
@@ -47,6 +47,10 @@ DISTUTILS_IN_SOURCE_BUILD=1
distutils_enable_tests pytest
+PATCHES=(
+ "${FILESDIR}"/${P}-pythran-tests-32-bit.patch
+)
+
src_unpack() {
default
if use doc; then
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/scipy/files/, dev-python/scipy/
@ 2022-06-24 3:58 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2022-06-24 3:58 UTC (permalink / raw
To: gentoo-commits
commit: 994f577def626844490506ecfbe6c05bfe39997a
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 23 12:38:19 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jun 24 03:58:00 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=994f577d
dev-python/scipy: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/scipy/Manifest | 3 -
.../files/scipy-1.8.0-skip-build-revert.patch | 22 ---
dev-python/scipy/scipy-1.8.0.ebuild | 191 ---------------------
3 files changed, 216 deletions(-)
diff --git a/dev-python/scipy/Manifest b/dev-python/scipy/Manifest
index 76487212a3c9..238fc4ae29ac 100644
--- a/dev-python/scipy/Manifest
+++ b/dev-python/scipy/Manifest
@@ -1,6 +1,3 @@
-DIST scipy-1.8.0.tar.gz 38313602 BLAKE2B 3f071ad3dfa350bba7eaf8e06c8bdb660f9dc1ef0e0bfc1eb1be2c400f947b2b26d62066a4b0f603ae56244131aff6e4c5b7e87cfd2aa7b278e3071062a4bf02 SHA512 674652728ae76479d17189e6974895bb838a8e83b17b9fb91c5f86faebf2a1387e1466555ac5b51d05c293f9b31b9a72e634f5858105ea984ca94bd2f05bbb4c
DIST scipy-1.8.1.tar.gz 38196215 BLAKE2B 180ae646adba2031a4bf99cd4feefe652b8e340110b3b2872e61aa1083054aadf369c7e3b3e3fd8fb71fcd831c95841d2dadd1c71e35e5f7d95800e5551173f0 SHA512 f6fc71c209991fe82baa4b10d8ade0deb1057f6f5942a91dfb7ae45f3eb78a4535efa2861badf5e2d37239fa99dbd99de760aa7e4854b95991ade0263004e7ea
-DIST scipy-html-1.7.1.zip 32435246 BLAKE2B fd8173da41aba95a14b1376f848bc668c4659bf1bbbdd0f87d926633d36f29c039957d38be145a5583010ebd83f6458090f75bdad773cc0f1591664e13c04c20 SHA512 ee59722878f6ef2d2319cdf4e6a60d3d1184f7c22752f9a8859eaa46fb677ebac9e8eef9c0826998e12bac9399e336799843341ef203224a82c9101347149672
DIST scipy-html-1.8.1.zip 37060661 BLAKE2B 2fa617c58eb47463f8a61f9798b32c6da255d26b8e86c1558e427a715093f5a29ced3847ab6ecfe88ce1017664f36ac3e9fa9bbf72ede7e0fd3812b5f41fe933 SHA512 95153dc1f404aa64898a700c94c0deea3ca842c3152167d0987edabcf4a8eba16b6c8e6bc38a6775a849dc621e6a21434baf53d1669b1865fa5049cffa4387ac
-DIST scipy-ref-1.7.1.pdf 33542025 BLAKE2B 6c978f06b770805f0fae06db740e8596658d98bbbc93c865127eae909957503bb38e02a9c97319aed07608718f8f373374b1cf3a8c3bd624aa3143f1d21bc428 SHA512 45720dc299594bac5c7539f950a0ff135b125d86bfe9847032cbff1f294601fefd0a1ac3fd7e3928b2702390c318ae2f8adca6403ba06ea1ded705fcff94ab79
DIST scipy-ref-1.8.1.pdf 35025868 BLAKE2B 9221755d2dc69b8623271f75ff3078a0a4410fe9ff69ee317b40bf145af7da21a7f5f4b6b67820d8bb2878f83b7014f1ea7c2f0e026afb716da0479d394505e2 SHA512 8f27dcb9dd1030e15266389af21a1475ecfec5ea777fb2dbcf8db8d3398ac6e45c7040b8d6dbaffd29be3920925427be7c55efdc8094d670c857edfdab7f7728
diff --git a/dev-python/scipy/files/scipy-1.8.0-skip-build-revert.patch b/dev-python/scipy/files/scipy-1.8.0-skip-build-revert.patch
deleted file mode 100644
index caefc334a973..000000000000
--- a/dev-python/scipy/files/scipy-1.8.0-skip-build-revert.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 2b6392eeeb8ef5225ace15e8a1553fa87409272f Mon Sep 17 00:00:00 2001
-From: Ralf Gommers <ralf.gommers@gmail.com>
-Date: Wed, 29 Dec 2021 22:47:13 +0100
-Subject: [PATCH] Revert "BLD Respect the --skip-build flag in setup.py"
-
----
- setup.py | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 002531fcc00..d91916e5894 100755
---- a/setup.py
-+++ b/setup.py
-@@ -488,8 +488,6 @@ def setup_package():
- if "--force" in sys.argv:
- run_build = True
- sys.argv.remove('--force')
-- elif "--skip-build" in sys.argv:
-- run_build = False
- else:
- # Raise errors for unsupported commands, improve help output, etc.
- run_build = check_setuppy_command()
diff --git a/dev-python/scipy/scipy-1.8.0.ebuild b/dev-python/scipy/scipy-1.8.0.ebuild
deleted file mode 100644
index a502daa1354f..000000000000
--- a/dev-python/scipy/scipy-1.8.0.ebuild
+++ /dev/null
@@ -1,191 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit fortran-2 distutils-r1 flag-o-matic multiprocessing toolchain-funcs
-
-# upstream is slacking forever with doc updates
-DOC_PV=1.7.1
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="
- https://scipy.org/
- https://github.com/scipy/scipy/
- https://pypi.org/project/scipy/
-"
-SRC_URI="
- mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
- doc? (
- https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
- https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${DOC_PV}.pdf
- )"
-
-LICENSE="BSD LGPL-2"
-SLOT="0"
-KEYWORDS="amd64 arm arm64 -hppa ~ia64 ppc ppc64 ~riscv ~s390 ~sparc x86"
-IUSE="doc +pythran sparse"
-
-DEPEND="
- >=dev-python/numpy-1.17.3[lapack,${PYTHON_USEDEP}]
- sci-libs/arpack:0=
- virtual/cblas
- virtual/lapack
- sparse? ( sci-libs/umfpack:0= )"
-RDEPEND="${DEPEND}
- dev-python/pillow[${PYTHON_USEDEP}]"
-BDEPEND="
- dev-lang/swig
- >=dev-python/cython-0.29.18[${PYTHON_USEDEP}]
- dev-python/pybind11[${PYTHON_USEDEP}]
- virtual/pkgconfig
- doc? ( app-arch/unzip )
- pythran? ( dev-python/pythran[${PYTHON_USEDEP}] )
- test? (
- dev-python/nose[${PYTHON_USEDEP}]
- dev-python/pytest-xdist[${PYTHON_USEDEP}]
- )"
-
-DISTUTILS_IN_SOURCE_BUILD=1
-
-distutils_enable_tests pytest
-
-PATCHES=(
- "${FILESDIR}"/${P}-skip-build-revert.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() {
- # 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
-
- # TODO
- sed -e "s:== 'levy_stable':in ('levy_stable', 'crystalball', 'ncf'):" \
- -i scipy/stats/tests/test_continuous_basic.py || die
-
- # Skip known-failing test. Broken on all versions in Gentoo for years.
- # bug #743295
- sed -e 's:test_bisplev_integer_overflow:_&:' \
- -i scipy/interpolate/tests/test_fitpack.py || die
-
- # Skip a few 32-bit related failures
- if use x86 ; then
- # TODO: Tidy this up and switch to epytest
- sed -i -e 's:test_nd_axis_m1:_&:' \
- -e 's:test_nd_axis_0:_&:' \
- -e 's:test_maxiter_worsening:_&:' \
- -e 's:test_pdist_jensenshannon_iris:_&:' \
- -e 's:test_align_vectors_single_vector:_&:' \
- scipy/signal/tests/test_spectral.py \
- scipy/spatial/tests/test_distance.py \
- scipy/spatial/transform/tests/test_rotation.py || die
- fi
-
- if has_version ">=sci-libs/lapack-3.10"; then
- sed -e 's:test_sort(:_&:' \
- -i scipy/linalg/tests/test_decomp.py || die
- sed -e 's:test_solve_discrete_are:_&:' \
- -i scipy/linalg/tests/test_solvers.py || die
- fi
-
- distutils-r1_python_prepare_all
-}
-
-python_configure_all() {
- export SCIPY_USE_PYTHRAN=$(usex pythran 1 0)
-
- # bug 721860
- test-flag-FC -fallow-argument-mismatch &&
- append-fflags -fallow-argument-mismatch
-}
-
-python_compile() {
- # FIXME: parallel python building fails, bug #614464
- export ORIGINAL_MAKEOPTS="${MAKEOPTS}"
- 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"
-
- # Let's try using pytest again with xdist to speed things up.
- # Note that using pytest is required to avoid dying b/c of a
- # deprecation warning with distutils in Python 3.01.
- epytest -n "$(makeopts_jobs "${ORIGINAL_MAKEOPTS}" "$(get_nproc)")"
-}
-
-python_install_all() {
- use doc && \
- local DOCS=( "${DISTDIR}"/${PN}-ref-${DOC_PV}.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 " echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/scipy/files/, dev-python/scipy/
@ 2023-06-27 10:56 Sam James
0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2023-06-27 10:56 UTC (permalink / raw
To: gentoo-commits
commit: 07a7407c3e3ffd6ef563eee05ace9a3c40cdbddb
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 27 10:55:23 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 10:55:41 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07a7407c
dev-python/scipy: backport det(1x1) fix
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../scipy-1.11.0-determinant-1x1-matrix.patch | 69 +++++++++++
dev-python/scipy/scipy-1.11.0-r1.ebuild | 128 +++++++++++++++++++++
2 files changed, 197 insertions(+)
diff --git a/dev-python/scipy/files/scipy-1.11.0-determinant-1x1-matrix.patch b/dev-python/scipy/files/scipy-1.11.0-determinant-1x1-matrix.patch
new file mode 100644
index 000000000000..248ee5299f2c
--- /dev/null
+++ b/dev-python/scipy/files/scipy-1.11.0-determinant-1x1-matrix.patch
@@ -0,0 +1,69 @@
+https://github.com/scipy/scipy/issues/18759
+https://github.com/scipy/scipy/pull/18763
+https://github.com/scipy/scipy/commit/61d892c9faa543ad80bd5e2d0bf69821188487e0
+
+From 61d892c9faa543ad80bd5e2d0bf69821188487e0 Mon Sep 17 00:00:00 2001
+From: Ilhan Polat <ilhanpolat@gmail.com>
+Date: Tue, 27 Jun 2023 12:00:38 +0200
+Subject: [PATCH] MAINT:linalg.det:Return scalars for singleton inputs (#18763)
+
+--- a/scipy/linalg/_basic.py
++++ b/scipy/linalg/_basic.py
+@@ -1001,7 +1001,8 @@ def det(a, overwrite_a=False, check_finite=True):
+ det : (...) float or complex
+ Determinant of `a`. For stacked arrays, a scalar is returned for each
+ (m, m) slice in the last two dimensions of the input. For example, an
+- input of shape (p, q, m, m) will produce a result of shape (p, q).
++ input of shape (p, q, m, m) will produce a result of shape (p, q). If
++ all dimensions are 1 a scalar is returned regardless of ndim.
+
+ Notes
+ -----
+@@ -1066,11 +1067,17 @@ def det(a, overwrite_a=False, check_finite=True):
+
+ # Scalar case
+ if a1.shape[-2:] == (1, 1):
+- if a1.dtype.char in 'dD':
+- return np.squeeze(a1)
++ # Either ndarray with spurious singletons or a single element
++ if max(*a1.shape) > 1:
++ temp = np.squeeze(a1)
++ if a1.dtype.char in 'dD':
++ return temp
++ else:
++ return (temp.astype('d') if a1.dtype.char == 'f' else
++ temp.astype('D'))
+ else:
+- return (np.squeeze(a1).astype('d') if a1.dtype.char == 'f' else
+- np.squeeze(a1).astype('D'))
++ return (np.float64(a1.item()) if a1.dtype.char in 'fd' else
++ np.complex128(a1.item()))
+
+ # Then check overwrite permission
+ if not _datacopied(a1, a): # "a" still alive through "a1"
+--- a/scipy/linalg/tests/test_basic.py
++++ b/scipy/linalg/tests/test_basic.py
+@@ -930,6 +930,23 @@ class TestDet:
+ def setup_method(self):
+ self.rng = np.random.default_rng(1680305949878959)
+
++ def test_1x1_all_singleton_dims(self):
++ a = np.array([[1]])
++ deta = det(a)
++ assert deta.dtype.char == 'd'
++ assert np.isscalar(deta)
++ assert deta == 1.
++ a = np.array([[[[1]]]], dtype='f')
++ deta = det(a)
++ assert deta.dtype.char == 'd'
++ assert np.isscalar(deta)
++ assert deta == 1.
++ a = np.array([[[1 + 3.j]]], dtype=np.complex64)
++ deta = det(a)
++ assert deta.dtype.char == 'D'
++ assert np.isscalar(deta)
++ assert deta == 1.+3.j
++
+ def test_1by1_stacked_input_output(self):
+ a = self.rng.random([4, 5, 1, 1], dtype=np.float32)
+ deta = det(a)
diff --git a/dev-python/scipy/scipy-1.11.0-r1.ebuild b/dev-python/scipy/scipy-1.11.0-r1.ebuild
new file mode 100644
index 000000000000..f3c49aa6ef84
--- /dev/null
+++ b/dev-python/scipy/scipy-1.11.0-r1.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED=fortran
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=meson-python
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit fortran-2 distutils-r1 multiprocessing
+
+DESCRIPTION="Scientific algorithms library for Python"
+HOMEPAGE="
+ https://scipy.org/
+ https://github.com/scipy/scipy/
+ https://pypi.org/project/scipy/
+"
+
+if [[ ${PV} == *9999* ]] ; then
+ inherit git-r3
+
+ # Need submodules, so git for now.
+ EGIT_REPO_URI="https://github.com/scipy/scipy"
+ EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
+ EGIT_SUBMODULES=( '*' )
+else
+ inherit pypi
+
+ # Upstream is often behind with doc updates
+ DOC_PV=${PV}
+
+ SRC_URI+="
+ doc? (
+ https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
+ )"
+
+ if [[ ${PV} != *rc* ]] ; then
+ KEYWORDS="~amd64 ~arm ~arm64 -hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ fi
+fi
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+IUSE="doc +fortran test-rust"
+
+# umfpack is technically optional but it's preferred to have it available.
+DEPEND="
+ >=dev-python/numpy-1.21.6[lapack,${PYTHON_USEDEP}]
+ sci-libs/arpack:=
+ sci-libs/umfpack
+ virtual/cblas
+ >=virtual/lapack-3.8
+"
+RDEPEND="
+ ${DEPEND}
+ dev-python/pillow[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-lang/swig
+ >=dev-python/cython-0.29.35[${PYTHON_USEDEP}]
+ >=dev-python/meson-python-0.12.1[${PYTHON_USEDEP}]
+ >=dev-python/pybind11-2.10.4[${PYTHON_USEDEP}]
+ >=dev-util/meson-1.1.0
+ dev-util/patchelf
+ virtual/pkgconfig
+ doc? ( app-arch/unzip )
+ fortran? ( dev-python/pythran[${PYTHON_USEDEP}] )
+ test? (
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ )
+ test-rust? (
+ dev-python/pooch[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/${P}-determinant-1x1-matrix.patch
+)
+
+src_unpack() {
+ default
+
+ if use doc; then
+ unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
+ fi
+}
+
+python_configure_all() {
+ DISTUTILS_ARGS=(
+ -Dblas=blas
+ -Dlapack=lapack
+ -Duse-pythran=$(usex fortran true false)
+ )
+}
+
+python_test() {
+ cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
+
+ local EPYTEST_DESELECT=(
+ # Network
+ scipy/datasets/tests/test_data.py::TestDatasets::test_existence_all
+ scipy/datasets/tests/test_data.py::TestDatasets::test_ascent
+ scipy/datasets/tests/test_data.py::TestDatasets::test_face
+ scipy/datasets/tests/test_data.py::TestDatasets::test_electrocardiogram
+
+ # Precision issue with diff. blas?
+ scipy/optimize/tests/test__basinhopping.py::Test_Metropolis::test_gh7799
+ )
+ local EPYTEST_IGNORE=()
+
+ if ! has_version -b "dev-python/pooch[${PYTHON_USEDEP}]" ; then
+ EPYTEST_IGNORE+=(
+ scipy/datasets/tests/test_data.py
+ )
+ fi
+
+ epytest -n "$(makeopts_jobs)" scipy
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
+
+ distutils-r1_python_install_all
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/scipy/files/, dev-python/scipy/
@ 2024-07-05 19:04 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2024-07-05 19:04 UTC (permalink / raw
To: gentoo-commits
commit: 13d8f37a154f23e4aa1991851eabaec11143ba6e
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 5 19:04:04 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jul 5 19:04:04 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13d8f37a
dev-python/scipy: Backport a test fix to 1.13.1
Closes: https://bugs.gentoo.org/935383
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/scipy/files/scipy-1.13.1-test.patch | 46 ++++++++++++++++++++++++++
dev-python/scipy/scipy-1.13.1.ebuild | 5 +++
2 files changed, 51 insertions(+)
diff --git a/dev-python/scipy/files/scipy-1.13.1-test.patch b/dev-python/scipy/files/scipy-1.13.1-test.patch
new file mode 100644
index 000000000000..e10e8551b757
--- /dev/null
+++ b/dev-python/scipy/files/scipy-1.13.1-test.patch
@@ -0,0 +1,46 @@
+From 2f930ed7d579837423cf58f30d25d4922e4cef7c Mon Sep 17 00:00:00 2001
+From: Evgeni Burovski <evgeny.burovskiy@gmail.com>
+Date: Thu, 6 Jun 2024 10:01:58 +0300
+Subject: [PATCH] TST: linalg: bump tolerance in TestEig::test_singular
+
+Some assertions have atol/rtol configurable, and one assertion had them
+hardcoded, and that was causing tolerance problems in a Debian build with
+reference LAPACK.
+
+closes https://github.com/scipy/scipy/issues/20911
+---
+ scipy/linalg/tests/test_decomp.py | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/scipy/linalg/tests/test_decomp.py b/scipy/linalg/tests/test_decomp.py
+index 5e171965a4bd..2c4033360d16 100644
+--- a/scipy/linalg/tests/test_decomp.py
++++ b/scipy/linalg/tests/test_decomp.py
+@@ -181,7 +181,8 @@ def test_gh_3054(self):
+ assert_equal(w, np.inf)
+ assert_allclose(vr, 1)
+
+- def _check_gen_eig(self, A, B, atol_homog=1e-13, rtol_homog=1e-13):
++ def _check_gen_eig(self, A, B, atol_homog=1e-13, rtol_homog=1e-13,
++ atol=1e-13, rtol=1e-13):
+ if B is not None:
+ A, B = asarray(A), asarray(B)
+ B0 = B
+@@ -230,7 +231,7 @@ def _check_gen_eig(self, A, B, atol_homog=1e-13, rtol_homog=1e-13):
+ for i in range(res.shape[1]):
+ if np.all(isfinite(res[:, i])):
+ assert_allclose(res[:, i], 0,
+- rtol=1e-13, atol=1e-13, err_msg=msg)
++ rtol=rtol, atol=atol, err_msg=msg)
+
+ # try to consistently order eigenvalues, including complex conjugate pairs
+ w_fin = w[isfinite(w)]
+@@ -269,7 +270,7 @@ def test_singular(self):
+ [24, 35, 18, 21, 22]])
+
+ with np.errstate(all='ignore'):
+- self._check_gen_eig(A, B, atol_homog=5e-13)
++ self._check_gen_eig(A, B, atol_homog=5e-13, atol=5e-13)
+
+ def test_falker(self):
+ # Test matrices giving some Nan generalized eigenvalues.
diff --git a/dev-python/scipy/scipy-1.13.1.ebuild b/dev-python/scipy/scipy-1.13.1.ebuild
index 6858c42f2bcd..46e6f4a7ea8a 100644
--- a/dev-python/scipy/scipy-1.13.1.ebuild
+++ b/dev-python/scipy/scipy-1.13.1.ebuild
@@ -78,6 +78,11 @@ BDEPEND="
EPYTEST_XDIST=1
distutils_enable_tests pytest
+PATCHES=(
+ # https://github.com/scipy/scipy/pull/20914
+ "${FILESDIR}/${P}-test.patch"
+)
+
src_unpack() {
default
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/scipy/files/, dev-python/scipy/
@ 2024-07-13 19:25 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2024-07-13 19:25 UTC (permalink / raw
To: gentoo-commits
commit: 1981769ec1ed73c7789430d9ce75072ec5daab12
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 13 19:15:42 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jul 13 19:25:27 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1981769e
dev-python/scipy: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/scipy/Manifest | 9 --
dev-python/scipy/files/scipy-1.13.1-test.patch | 46 -------
dev-python/scipy/scipy-1.11.3-r2.ebuild | 150 ----------------------
dev-python/scipy/scipy-1.11.4-r1.ebuild | 150 ----------------------
dev-python/scipy/scipy-1.12.0-r1.ebuild | 151 ----------------------
dev-python/scipy/scipy-1.13.0.ebuild | 166 ------------------------
dev-python/scipy/scipy-1.13.1.ebuild | 171 -------------------------
7 files changed, 843 deletions(-)
diff --git a/dev-python/scipy/Manifest b/dev-python/scipy/Manifest
index d0f7b049753a..1e6b60d8065c 100644
--- a/dev-python/scipy/Manifest
+++ b/dev-python/scipy/Manifest
@@ -1,11 +1,2 @@
-DIST scipy-1.11.3.tar.gz 56335652 BLAKE2B 2b35c24522b2bd498b4ebe84a854c8ec1e62917e7b899b3e3526abb9780c1e56f8e776a3bb1eab1bedb17a273fac881e5ffdaac808084a4f5a5f97428bff1029 SHA512 6491c4e479d9f4f02e677396a25ddca947a0dc6c009fc2ec34c658012a6224c0b535f14045bb011fbde9973ea987d184574ed64e6760c31798ec860eb0896fcf
-DIST scipy-1.11.4.tar.gz 56336202 BLAKE2B a2091a1edb54eb73c2de6ed8c62a7e571f37b247c9af50947aa97b739342c96b87b20a82b1a238c859fa532c84249cbadde228366dcea3555e9a506c1ae55031 SHA512 2eb403f6de9723b411d948b8e1b5457078704c605b8e760d42362c82d802e167eaaf701ddb8b480af2bdf2efe4dbf66fcc4e97321519bb8dab19b0e2a8976beb
-DIST scipy-1.12.0.tar.gz 56811768 BLAKE2B 03c142274f1466747935fa54fab427f3a48c1642406211fa1a0f8ad5e0f194baecf76182e0448a0fb647063871483239cd876ce431cd9406e396e6170912ab64 SHA512 376ed94c4caaf782814bb07047fff0b363f7b608a0399697c6e862432333cbe6d3abb351730a574a3f077b3cdd9cb7474090a460baffcfbd5546bcfee309b6e7
-DIST scipy-1.13.0.tar.gz 57204550 BLAKE2B cfbb4e76efae952854e9ff4ed254e9819b58d224906e1ded3c6a914b1e28b5fad15f8bbbb4a9c413969d6e4b1faf4e0038a36729171ff06e640b241a9dd4af94 SHA512 9bd6fd3f76742a07e5bb003edf4c0e3a82edf749077502fbce3d16fe595d455846edcf57db12ec0a9d4792803e974355362d919047414badfcaededf1e4343f7
-DIST scipy-1.13.1.tar.gz 57210720 BLAKE2B d58d673de9b8d6239a3de285982d65ba1baf0ca8b623276c19b85b1f4bb83c56e66c32d7a22d1d602435cfa086b5d56167cac55bdda608590aaddf677844f060 SHA512 28aafdbcae7229a3d11f192683b703cb485d45e4d90413d6564df3d9005bc8fd4df8bd92caffe657666828cd7253e7e0363c0948c74a1b8f3f3b7d4f4cfd9b36
DIST scipy-1.14.0.tar.gz 58618870 BLAKE2B bf9ed05628b02dc058555402995caae722cf6802bde80387d4e4477ec533589a66ca70b5dd44a32ddac652c7c69300406434b80e7cbc9aee2a78ae6b26ee4c2b SHA512 6579d988a2093602f5fc82203bbb5dc5690a95032484b5d5bd843d1e7995b3b89d802c7b38ec0345c1f3d8e22c98fb92b3982a1eadfcdf63607f929a52b56abf
-DIST scipy-html-1.11.0.zip 50421508 BLAKE2B cb5e4a4f8817a80f54ae73b4a47ba22d2438df46ebfe27ef5fdc2695fdd983226f4ccae925bf82b15d01ced4f4b6807384ecadac5e1aa7700aa887ad06b7d065 SHA512 33718bbd5e828687d93fccc441a53b6a2e8f54ac4952d3b69d4c4668f55cb6ef5aba33df9acda20b2400effa5ae71767b2a5602a365ad2045a6edd24ff89c253
-DIST scipy-html-1.11.2.zip 50435722 BLAKE2B 460c67509a8bf50986f866ee2f90e634af21ddd71508efeef5681c2ee2130c3f79b4b428bc21277bfb310bb45ccad1fb38221ada43620055377cdc4839b9d1e5 SHA512 986a6e37f9e01dc4925ef22af6ff660bae1e4b66e57270262974c207dfb70285e3f8f548774d6e81d5f457b9198c0ba1c06e6d689fe5d54fdea878c1e5a7f797
-DIST scipy-html-1.13.0.zip 65327245 BLAKE2B 5e5ffbf4ff4a28c5a003da0e5170ef5eef1b430ecca0284a89aed5f96f7afc549db001beb2e56b3debbd3527c57b773b25c35579b32d8a6d8e5e97a75db4d38b SHA512 792c32f077d76d47e42d02c5047990a6afdcdc9c31dcc7e9987e7a5aa62c56aec44dcf7d14e3f94ae59f8fb718ce89a2835b87d2aef7a16ce9a534361b7329d7
-DIST scipy-html-1.13.1.zip 65288062 BLAKE2B 4eea1277870fcc0070d543139ef8b786d3c6841835601eb5447fed042d03035edfb556f824ccbf9946f1efa41da75372df1dd3789d045bdbaea7e156010bb8e6 SHA512 fc70eb7fa3763e40f2389ad31e1a78fcd2aa1b3db40927f57a583692143001c8b6a8f3f0ddea47eaf62adb30d1207765d8887a2a53baa1b8ed706b7fb348bbbf
DIST scipy-html-1.14.0.zip 65723829 BLAKE2B ba47dbf00a5d2a53a9addc5ea68ab18b42f211a018b89aa4b0b57ff0dee02e410a3effc59ddf8fbbc5aa33075d45d86880aed3a14068da5bd7b62ee526199967 SHA512 93be0bafcc64cea1ba130bbcc77c0741acc4f819c84a5030391a22657a1bc63abe8434a2723f66b7ad04c0809dc6d02e3a97ffb8d94bd3d4a4bb759ee796b475
diff --git a/dev-python/scipy/files/scipy-1.13.1-test.patch b/dev-python/scipy/files/scipy-1.13.1-test.patch
deleted file mode 100644
index e10e8551b757..000000000000
--- a/dev-python/scipy/files/scipy-1.13.1-test.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 2f930ed7d579837423cf58f30d25d4922e4cef7c Mon Sep 17 00:00:00 2001
-From: Evgeni Burovski <evgeny.burovskiy@gmail.com>
-Date: Thu, 6 Jun 2024 10:01:58 +0300
-Subject: [PATCH] TST: linalg: bump tolerance in TestEig::test_singular
-
-Some assertions have atol/rtol configurable, and one assertion had them
-hardcoded, and that was causing tolerance problems in a Debian build with
-reference LAPACK.
-
-closes https://github.com/scipy/scipy/issues/20911
----
- scipy/linalg/tests/test_decomp.py | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/scipy/linalg/tests/test_decomp.py b/scipy/linalg/tests/test_decomp.py
-index 5e171965a4bd..2c4033360d16 100644
---- a/scipy/linalg/tests/test_decomp.py
-+++ b/scipy/linalg/tests/test_decomp.py
-@@ -181,7 +181,8 @@ def test_gh_3054(self):
- assert_equal(w, np.inf)
- assert_allclose(vr, 1)
-
-- def _check_gen_eig(self, A, B, atol_homog=1e-13, rtol_homog=1e-13):
-+ def _check_gen_eig(self, A, B, atol_homog=1e-13, rtol_homog=1e-13,
-+ atol=1e-13, rtol=1e-13):
- if B is not None:
- A, B = asarray(A), asarray(B)
- B0 = B
-@@ -230,7 +231,7 @@ def _check_gen_eig(self, A, B, atol_homog=1e-13, rtol_homog=1e-13):
- for i in range(res.shape[1]):
- if np.all(isfinite(res[:, i])):
- assert_allclose(res[:, i], 0,
-- rtol=1e-13, atol=1e-13, err_msg=msg)
-+ rtol=rtol, atol=atol, err_msg=msg)
-
- # try to consistently order eigenvalues, including complex conjugate pairs
- w_fin = w[isfinite(w)]
-@@ -269,7 +270,7 @@ def test_singular(self):
- [24, 35, 18, 21, 22]])
-
- with np.errstate(all='ignore'):
-- self._check_gen_eig(A, B, atol_homog=5e-13)
-+ self._check_gen_eig(A, B, atol_homog=5e-13, atol=5e-13)
-
- def test_falker(self):
- # Test matrices giving some Nan generalized eigenvalues.
diff --git a/dev-python/scipy/scipy-1.11.3-r2.ebuild b/dev-python/scipy/scipy-1.11.3-r2.ebuild
deleted file mode 100644
index ada4553734a9..000000000000
--- a/dev-python/scipy/scipy-1.11.3-r2.ebuild
+++ /dev/null
@@ -1,150 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-FORTRAN_NEEDED=fortran
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=meson-python
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit flag-o-matic fortran-2 distutils-r1 multiprocessing
-
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="
- https://scipy.org/
- https://github.com/scipy/scipy/
- https://pypi.org/project/scipy/
-"
-
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- # Need submodules, so git for now.
- EGIT_REPO_URI="https://github.com/scipy/scipy"
- EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
- EGIT_SUBMODULES=( '*' )
-else
- inherit pypi
-
- # Upstream is often behind with doc updates
- #DOC_PV=${PV}
- DOC_PV=1.11.0
-
- SRC_URI+="
- doc? (
- https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
- )"
-
- if [[ ${PV} != *rc* ]] ; then
- KEYWORDS="amd64 arm arm64 ~loong ppc64 ~riscv ~sparc x86"
- fi
-fi
-
-LICENSE="BSD LGPL-2"
-SLOT="0"
-IUSE="doc +fortran test-rust"
-
-# umfpack is technically optional but it's preferred to have it available.
-DEPEND="
- >=dev-python/numpy-1.21.6:=[lapack,${PYTHON_USEDEP}]
- sci-libs/arpack:=
- sci-libs/umfpack
- virtual/cblas
- >=virtual/lapack-3.8
-"
-RDEPEND="
- ${DEPEND}
- dev-python/pillow[${PYTHON_USEDEP}]
-"
-BDEPEND="
- dev-lang/swig
- >=dev-python/cython-0.29.35[${PYTHON_USEDEP}]
- >=dev-python/meson-python-0.12.1[${PYTHON_USEDEP}]
- >=dev-python/pybind11-2.10.4[${PYTHON_USEDEP}]
- >=dev-build/meson-1.1.0
- !kernel_Darwin? ( dev-util/patchelf )
- virtual/pkgconfig
- doc? ( app-arch/unzip )
- fortran? ( dev-python/pythran[${PYTHON_USEDEP}] )
- test? (
- dev-python/pytest-xdist[${PYTHON_USEDEP}]
- )
- test-rust? (
- dev-python/pooch[${PYTHON_USEDEP}]
- )
-"
-
-distutils_enable_tests pytest
-
-src_unpack() {
- default
-
- if use doc; then
- unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
- fi
-}
-
-python_configure_all() {
- # https://github.com/scipy/scipy/pull/19857
- # Fixed in 1.13.0
- filter-lto
- DISTUTILS_ARGS=(
- -Dblas=blas
- -Dlapack=lapack
- -Duse-pythran=$(usex fortran true false)
- )
-}
-
-python_test() {
- cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
-
- local EPYTEST_DESELECT=(
- # Network
- scipy/datasets/tests/test_data.py::TestDatasets::test_existence_all
- scipy/datasets/tests/test_data.py::TestDatasets::test_ascent
- scipy/datasets/tests/test_data.py::TestDatasets::test_face
- scipy/datasets/tests/test_data.py::TestDatasets::test_electrocardiogram
-
- # Precision issue with diff. blas?
- scipy/optimize/tests/test__basinhopping.py::Test_Metropolis::test_gh7799
-
- # Crashes with assertion, not a regression
- # https://github.com/scipy/scipy/issues/19321
- scipy/signal/tests/test_signaltools.py::test_lfilter_bad_object
-
- # timeouts
- scipy/sparse/linalg/tests/test_propack.py::test_examples
- # hang or incredibly slow
- scipy/optimize/tests/test_lsq_linear.py::TestBVLS::test_large_rank_deficient
- scipy/optimize/tests/test_lsq_linear.py::TestTRF::test_large_rank_deficient
- )
- local EPYTEST_IGNORE=()
-
- if ! has_version -b "dev-python/pooch[${PYTHON_USEDEP}]" ; then
- EPYTEST_IGNORE+=(
- scipy/datasets/tests/test_data.py
- )
- fi
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # fd leaks in tests
- # https://github.com/scipy/scipy/issues/19553
- scipy/fft/_pocketfft/tests/test_real_transforms.py
- # TODO
- 'scipy/special/tests/test_data.py::test_boost[<Data for expi: expinti_data_long_ipp-expinti_data_long>]'
- )
- ;;
- esac
-
- epytest -n "$(makeopts_jobs)" --dist=worksteal scipy
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
-
- distutils-r1_python_install_all
-}
diff --git a/dev-python/scipy/scipy-1.11.4-r1.ebuild b/dev-python/scipy/scipy-1.11.4-r1.ebuild
deleted file mode 100644
index 57a88fe87cf2..000000000000
--- a/dev-python/scipy/scipy-1.11.4-r1.ebuild
+++ /dev/null
@@ -1,150 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-FORTRAN_NEEDED=fortran
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=meson-python
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit flag-o-matic fortran-2 distutils-r1 multiprocessing
-
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="
- https://scipy.org/
- https://github.com/scipy/scipy/
- https://pypi.org/project/scipy/
-"
-
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- # Need submodules, so git for now.
- EGIT_REPO_URI="https://github.com/scipy/scipy"
- EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
- EGIT_SUBMODULES=( '*' )
-else
- inherit pypi
-
- # Upstream is often behind with doc updates
- #DOC_PV=${PV}
- DOC_PV=1.11.2
-
- SRC_URI+="
- doc? (
- https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
- )"
-
- if [[ ${PV} != *rc* ]] ; then
- KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv ~s390 ~sparc ~x86"
- fi
-fi
-
-LICENSE="BSD LGPL-2"
-SLOT="0"
-IUSE="doc +fortran test-rust"
-
-# umfpack is technically optional but it's preferred to have it available.
-DEPEND="
- >=dev-python/numpy-1.21.6:=[lapack,${PYTHON_USEDEP}]
- sci-libs/arpack:=
- sci-libs/umfpack
- virtual/cblas
- >=virtual/lapack-3.8
-"
-RDEPEND="
- ${DEPEND}
- dev-python/pillow[${PYTHON_USEDEP}]
-"
-BDEPEND="
- dev-lang/swig
- >=dev-python/cython-0.29.35[${PYTHON_USEDEP}]
- >=dev-python/meson-python-0.12.1[${PYTHON_USEDEP}]
- >=dev-python/pybind11-2.10.4[${PYTHON_USEDEP}]
- >=dev-build/meson-1.1.0
- !kernel_Darwin? ( dev-util/patchelf )
- virtual/pkgconfig
- doc? ( app-arch/unzip )
- fortran? ( dev-python/pythran[${PYTHON_USEDEP}] )
- test? (
- dev-python/pytest-xdist[${PYTHON_USEDEP}]
- )
- test-rust? (
- dev-python/pooch[${PYTHON_USEDEP}]
- )
-"
-
-distutils_enable_tests pytest
-
-src_unpack() {
- default
-
- if use doc; then
- unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
- fi
-}
-
-python_configure_all() {
- # https://github.com/scipy/scipy/pull/19857
- # Fixed in 1.13.0
- filter-lto
- DISTUTILS_ARGS=(
- -Dblas=blas
- -Dlapack=lapack
- -Duse-pythran=$(usex fortran true false)
- )
-}
-
-python_test() {
- cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
-
- local EPYTEST_DESELECT=(
- # Network
- scipy/datasets/tests/test_data.py::TestDatasets::test_existence_all
- scipy/datasets/tests/test_data.py::TestDatasets::test_ascent
- scipy/datasets/tests/test_data.py::TestDatasets::test_face
- scipy/datasets/tests/test_data.py::TestDatasets::test_electrocardiogram
-
- # Precision issue with diff. blas?
- scipy/optimize/tests/test__basinhopping.py::Test_Metropolis::test_gh7799
-
- # Crashes with assertion, not a regression
- # https://github.com/scipy/scipy/issues/19321
- scipy/signal/tests/test_signaltools.py::test_lfilter_bad_object
-
- # timeouts
- scipy/sparse/linalg/tests/test_propack.py::test_examples
- # hang or incredibly slow
- scipy/optimize/tests/test_lsq_linear.py::TestBVLS::test_large_rank_deficient
- scipy/optimize/tests/test_lsq_linear.py::TestTRF::test_large_rank_deficient
- )
- local EPYTEST_IGNORE=()
-
- if ! has_version -b "dev-python/pooch[${PYTHON_USEDEP}]" ; then
- EPYTEST_IGNORE+=(
- scipy/datasets/tests/test_data.py
- )
- fi
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # fd leaks in tests
- # https://github.com/scipy/scipy/issues/19553
- scipy/fft/_pocketfft/tests/test_real_transforms.py
- # TODO
- 'scipy/special/tests/test_data.py::test_boost[<Data for expi: expinti_data_long_ipp-expinti_data_long>]'
- )
- ;;
- esac
-
- epytest -n "$(makeopts_jobs)" --dist=worksteal scipy
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
-
- distutils-r1_python_install_all
-}
diff --git a/dev-python/scipy/scipy-1.12.0-r1.ebuild b/dev-python/scipy/scipy-1.12.0-r1.ebuild
deleted file mode 100644
index d3dff15df08b..000000000000
--- a/dev-python/scipy/scipy-1.12.0-r1.ebuild
+++ /dev/null
@@ -1,151 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-FORTRAN_NEEDED=fortran
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=meson-python
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit flag-o-matic fortran-2 distutils-r1
-
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="
- https://scipy.org/
- https://github.com/scipy/scipy/
- https://pypi.org/project/scipy/
-"
-
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- # Need submodules, so git for now.
- EGIT_REPO_URI="https://github.com/scipy/scipy"
- EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
- EGIT_SUBMODULES=( '*' )
-else
- inherit pypi
-
- # Upstream is often behind with doc updates
- #DOC_PV=${PV}
- DOC_PV=1.11.2
-
- SRC_URI+="
- doc? (
- https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
- )"
-
- if [[ ${PV} != *rc* ]] ; then
- KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- fi
-fi
-
-LICENSE="BSD LGPL-2"
-SLOT="0"
-IUSE="doc +fortran test-rust"
-
-# umfpack is technically optional but it's preferred to have it available.
-DEPEND="
- >=dev-python/numpy-1.21.6:=[lapack,${PYTHON_USEDEP}]
- sci-libs/arpack:=
- sci-libs/umfpack
- virtual/cblas
- >=virtual/lapack-3.8
-"
-RDEPEND="
- ${DEPEND}
- dev-python/pillow[${PYTHON_USEDEP}]
-"
-BDEPEND="
- dev-lang/swig
- >=dev-python/cython-0.29.35[${PYTHON_USEDEP}]
- >=dev-python/meson-python-0.12.1[${PYTHON_USEDEP}]
- >=dev-python/pybind11-2.10.4[${PYTHON_USEDEP}]
- >=dev-build/meson-1.1.0
- !kernel_Darwin? ( dev-util/patchelf )
- virtual/pkgconfig
- doc? ( app-arch/unzip )
- fortran? ( dev-python/pythran[${PYTHON_USEDEP}] )
- test? (
- dev-python/hypothesis[${PYTHON_USEDEP}]
- )
- test-rust? (
- dev-python/pooch[${PYTHON_USEDEP}]
- )
-"
-
-EPYTEST_XDIST=1
-distutils_enable_tests pytest
-
-src_unpack() {
- default
-
- if use doc; then
- unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
- fi
-}
-
-python_configure_all() {
- # https://github.com/scipy/scipy/pull/19857
- # Fixed in 1.13.0
- filter-lto
- DISTUTILS_ARGS=(
- -Dblas=blas
- -Dlapack=lapack
- -Duse-pythran=$(usex fortran true false)
- )
-}
-
-python_test() {
- cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
-
- local EPYTEST_DESELECT=(
- # Network
- scipy/datasets/tests/test_data.py::TestDatasets::test_existence_all
- scipy/datasets/tests/test_data.py::TestDatasets::test_ascent
- scipy/datasets/tests/test_data.py::TestDatasets::test_face
- scipy/datasets/tests/test_data.py::TestDatasets::test_electrocardiogram
-
- # Precision issue with diff. blas?
- scipy/optimize/tests/test__basinhopping.py::Test_Metropolis::test_gh7799
-
- # Crashes with assertion, not a regression
- # https://github.com/scipy/scipy/issues/19321
- scipy/signal/tests/test_signaltools.py::test_lfilter_bad_object
-
- # timeouts
- scipy/sparse/linalg/tests/test_propack.py::test_examples
- # hang or incredibly slow
- scipy/optimize/tests/test_lsq_linear.py::TestBVLS::test_large_rank_deficient
- scipy/optimize/tests/test_lsq_linear.py::TestTRF::test_large_rank_deficient
- )
- local EPYTEST_IGNORE=()
-
- if ! has_version -b "dev-python/pooch[${PYTHON_USEDEP}]" ; then
- EPYTEST_IGNORE+=(
- scipy/datasets/tests/test_data.py
- )
- fi
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # fd leaks in tests
- # https://github.com/scipy/scipy/issues/19553
- scipy/fft/_pocketfft/tests/test_real_transforms.py
- # TODO
- 'scipy/special/tests/test_data.py::test_boost[<Data for expi: expinti_data_long_ipp-expinti_data_long>]'
- )
- ;;
- esac
-
- epytest scipy
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
-
- distutils-r1_python_install_all
-}
diff --git a/dev-python/scipy/scipy-1.13.0.ebuild b/dev-python/scipy/scipy-1.13.0.ebuild
deleted file mode 100644
index f361a013c952..000000000000
--- a/dev-python/scipy/scipy-1.13.0.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-FORTRAN_NEEDED=fortran
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=meson-python
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit fortran-2 distutils-r1
-
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="
- https://scipy.org/
- https://github.com/scipy/scipy/
- https://pypi.org/project/scipy/
-"
-
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- # Need submodules, so git for now.
- EGIT_REPO_URI="https://github.com/scipy/scipy"
- EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
- EGIT_SUBMODULES=( '*' )
-else
- inherit pypi
-
- # Upstream is often behind with doc updates
- DOC_PV=${PV}
-
- SRC_URI+="
- doc? (
- https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
- )"
-
- if [[ ${PV} != *rc* ]] ; then
- KEYWORDS="~amd64 ~arm arm64 ~loong ~ppc ppc64 ~riscv ~s390 ~sparc ~x86"
- fi
-fi
-
-LICENSE="BSD LGPL-2"
-SLOT="0"
-IUSE="doc +fortran test-rust"
-
-# umfpack is technically optional but it's preferred to have it available.
-DEPEND="
- >=dev-python/numpy-1.22.4:=[lapack,${PYTHON_USEDEP}]
- sci-libs/arpack:=
- sci-libs/umfpack
- virtual/cblas
- >=virtual/lapack-3.8
-"
-RDEPEND="
- ${DEPEND}
- dev-python/pillow[${PYTHON_USEDEP}]
-"
-BDEPEND="
- dev-lang/swig
- >=dev-python/cython-3.0.8[${PYTHON_USEDEP}]
- >=dev-python/meson-python-0.15.0[${PYTHON_USEDEP}]
- >=dev-python/pybind11-2.12.0[${PYTHON_USEDEP}]
- >=dev-build/meson-1.1.0
- !kernel_Darwin? ( dev-util/patchelf )
- virtual/pkgconfig
- doc? ( app-arch/unzip )
- fortran? ( >=dev-python/pythran-0.14.0[${PYTHON_USEDEP}] )
- test? (
- >=dev-python/hypothesis-6.30[${PYTHON_USEDEP}]
- )
- test-rust? (
- dev-python/pooch[${PYTHON_USEDEP}]
- )
-"
-
-EPYTEST_XDIST=1
-distutils_enable_tests pytest
-
-src_unpack() {
- default
-
- if use doc; then
- unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
- fi
-}
-
-python_configure_all() {
- DISTUTILS_ARGS=(
- -Dblas=blas
- -Dlapack=lapack
- -Duse-pythran=$(usex fortran true false)
- )
-
- # hide real scipy, to prevent pythran crashing when scipy is being
- # rebuilt for new numpy ABI
- # https://github.com/serge-sans-paille/pythran/issues/2194
- cat >> "${T}/scipy.py" <<-EOF || die
- raise ImportError("hide real scipy")
- EOF
-}
-
-python_compile() {
- local -x PYTHONPATH="${T}${PYTHONPATH+:${PYTHONPATH}}"
- distutils-r1_python_compile
-}
-
-python_test() {
- cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
-
- local EPYTEST_DESELECT=(
- # Network
- scipy/datasets/tests/test_data.py::TestDatasets::test_existence_all
- scipy/datasets/tests/test_data.py::TestDatasets::test_ascent
- scipy/datasets/tests/test_data.py::TestDatasets::test_face
- scipy/datasets/tests/test_data.py::TestDatasets::test_electrocardiogram
-
- # Precision issue with diff. blas?
- scipy/optimize/tests/test__basinhopping.py::Test_Metropolis::test_gh7799
-
- # Crashes with assertion, not a regression
- # https://github.com/scipy/scipy/issues/19321
- scipy/signal/tests/test_signaltools.py::test_lfilter_bad_object
-
- # timeouts
- scipy/sparse/linalg/tests/test_propack.py::test_examples
- # hang or incredibly slow
- scipy/optimize/tests/test_lsq_linear.py::TestBVLS::test_large_rank_deficient
- scipy/optimize/tests/test_lsq_linear.py::TestTRF::test_large_rank_deficient
-
- # TODO
- scipy/optimize/tests/test_minimize_constrained.py::TestTrustRegionConstr::test_list_of_problems
- )
- local EPYTEST_IGNORE=()
-
- if ! has_version -b "dev-python/pooch[${PYTHON_USEDEP}]" ; then
- EPYTEST_IGNORE+=(
- scipy/datasets/tests/test_data.py
- )
- fi
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # fd leaks in tests
- # https://github.com/scipy/scipy/issues/19553
- scipy/fft/_pocketfft/tests/test_real_transforms.py
- # TODO
- 'scipy/special/tests/test_data.py::test_boost[<Data for expi: expinti_data_long_ipp-expinti_data_long>]'
- # missing dict.__ror__
- # https://github.com/pypy/pypy/issues/4934
- 'scipy/sparse/tests/test_dok.py::test_dunder_ror[dok_matrix]'
- )
- ;;
- esac
-
- local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
- epytest scipy
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
-
- distutils-r1_python_install_all
-}
diff --git a/dev-python/scipy/scipy-1.13.1.ebuild b/dev-python/scipy/scipy-1.13.1.ebuild
deleted file mode 100644
index 5200331cde1f..000000000000
--- a/dev-python/scipy/scipy-1.13.1.ebuild
+++ /dev/null
@@ -1,171 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-FORTRAN_NEEDED=fortran
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=meson-python
-PYTHON_COMPAT=( pypy3 python3_{10..12} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit fortran-2 distutils-r1
-
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="
- https://scipy.org/
- https://github.com/scipy/scipy/
- https://pypi.org/project/scipy/
-"
-
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- # Need submodules, so git for now.
- EGIT_REPO_URI="https://github.com/scipy/scipy"
- EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
- EGIT_SUBMODULES=( '*' )
-else
- inherit pypi
-
- # Upstream is often behind with doc updates
- DOC_PV=${PV}
-
- SRC_URI+="
- doc? (
- https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
- )"
-
- if [[ ${PV} != *rc* ]] ; then
- KEYWORDS="amd64 arm arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc x86"
- fi
-fi
-
-LICENSE="BSD LGPL-2"
-SLOT="0"
-IUSE="doc +fortran test-rust"
-
-# umfpack is technically optional but it's preferred to have it available.
-DEPEND="
- >=dev-python/numpy-1.22.4:=[lapack,${PYTHON_USEDEP}]
- sci-libs/arpack:=
- sci-libs/umfpack
- virtual/cblas
- >=virtual/lapack-3.8
-"
-RDEPEND="
- ${DEPEND}
- dev-python/pillow[${PYTHON_USEDEP}]
-"
-BDEPEND="
- dev-lang/swig
- >=dev-python/cython-3.0.8[${PYTHON_USEDEP}]
- >=dev-python/meson-python-0.15.0[${PYTHON_USEDEP}]
- >=dev-python/pybind11-2.12.0[${PYTHON_USEDEP}]
- >=dev-build/meson-1.1.0
- !kernel_Darwin? ( dev-util/patchelf )
- virtual/pkgconfig
- doc? ( app-arch/unzip )
- fortran? ( >=dev-python/pythran-0.14.0[${PYTHON_USEDEP}] )
- test? (
- >=dev-python/hypothesis-6.30[${PYTHON_USEDEP}]
- )
- test-rust? (
- dev-python/pooch[${PYTHON_USEDEP}]
- )
-"
-
-EPYTEST_XDIST=1
-distutils_enable_tests pytest
-
-PATCHES=(
- # https://github.com/scipy/scipy/pull/20914
- "${FILESDIR}/${P}-test.patch"
-)
-
-src_unpack() {
- default
-
- if use doc; then
- unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
- fi
-}
-
-python_configure_all() {
- DISTUTILS_ARGS=(
- -Dblas=blas
- -Dlapack=lapack
- -Duse-pythran=$(usex fortran true false)
- )
-
- # hide real scipy, to prevent pythran crashing when scipy is being
- # rebuilt for new numpy ABI
- # https://github.com/serge-sans-paille/pythran/issues/2194
- cat >> "${T}/scipy.py" <<-EOF || die
- raise ImportError("hide real scipy")
- EOF
-}
-
-python_compile() {
- local -x PYTHONPATH="${T}${PYTHONPATH+:${PYTHONPATH}}"
- distutils-r1_python_compile
-}
-
-python_test() {
- cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
-
- local EPYTEST_DESELECT=(
- # Network
- scipy/datasets/tests/test_data.py::TestDatasets::test_existence_all
- scipy/datasets/tests/test_data.py::TestDatasets::test_ascent
- scipy/datasets/tests/test_data.py::TestDatasets::test_face
- scipy/datasets/tests/test_data.py::TestDatasets::test_electrocardiogram
-
- # Precision issue with diff. blas?
- scipy/optimize/tests/test__basinhopping.py::Test_Metropolis::test_gh7799
-
- # Crashes with assertion, not a regression
- # https://github.com/scipy/scipy/issues/19321
- scipy/signal/tests/test_signaltools.py::test_lfilter_bad_object
-
- # timeouts
- scipy/sparse/linalg/tests/test_propack.py::test_examples
- # hang or incredibly slow
- scipy/optimize/tests/test_lsq_linear.py::TestBVLS::test_large_rank_deficient
- scipy/optimize/tests/test_lsq_linear.py::TestTRF::test_large_rank_deficient
-
- # TODO
- scipy/optimize/tests/test_minimize_constrained.py::TestTrustRegionConstr::test_list_of_problems
- )
- local EPYTEST_IGNORE=()
-
- if ! has_version -b "dev-python/pooch[${PYTHON_USEDEP}]" ; then
- EPYTEST_IGNORE+=(
- scipy/datasets/tests/test_data.py
- )
- fi
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # fd leaks in tests
- # https://github.com/scipy/scipy/issues/19553
- scipy/fft/_pocketfft/tests/test_real_transforms.py
- # TODO
- 'scipy/special/tests/test_data.py::test_boost[<Data for expi: expinti_data_long_ipp-expinti_data_long>]'
- # missing dict.__ror__
- # https://github.com/pypy/pypy/issues/4934
- 'scipy/sparse/tests/test_dok.py::test_dunder_ror[dok_matrix]'
- )
- ;;
- esac
-
- local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
- epytest scipy
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
-
- distutils-r1_python_install_all
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/scipy/files/, dev-python/scipy/
@ 2024-08-13 20:41 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2024-08-13 20:41 UTC (permalink / raw
To: gentoo-commits
commit: 68ed3fe84fdbab8d929e70efe749d5c38fe77814
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 13 18:44:04 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 13 20:07:47 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68ed3fe8
dev-python/scipy: Backport a patch related to numpy-2
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/scipy/files/scipy-1.14.0-np2.patch | 68 ++++++++++
dev-python/scipy/scipy-1.14.0-r1.ebuild | 173 ++++++++++++++++++++++++++
2 files changed, 241 insertions(+)
diff --git a/dev-python/scipy/files/scipy-1.14.0-np2.patch b/dev-python/scipy/files/scipy-1.14.0-np2.patch
new file mode 100644
index 000000000000..fdb81baa68a6
--- /dev/null
+++ b/dev-python/scipy/files/scipy-1.14.0-np2.patch
@@ -0,0 +1,68 @@
+From 87c4932ca0e4dbe10f918bc5e8096e30fc6557e7 Mon Sep 17 00:00:00 2001
+From: Lucas Colley <lucas.colley8@gmail.com>
+Date: Mon, 29 Jul 2024 17:57:11 +0100
+Subject: [PATCH 1/2] BUG: stats: adapt to `np.floor` type promotion removal
+
+`rv_discrete._cdf` relied on `np.floor` promoting its integer input to `np.float64`. This is no longer the case since numpy/numpy#26766.
+
+[skip cirrus] [skip circle]
+---
+ scipy/stats/_distn_infrastructure.py | 2 +-
+ scipy/stats/tests/test_discrete_basic.py | 12 ++++++++++++
+ 2 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/scipy/stats/_distn_infrastructure.py b/scipy/stats/_distn_infrastructure.py
+index a7a0bb66b396..83954af2c11f 100644
+--- a/scipy/stats/_distn_infrastructure.py
++++ b/scipy/stats/_distn_infrastructure.py
+@@ -3392,7 +3392,7 @@ def _cdf_single(self, k, *args):
+ return np.sum(self._pmf(m, *args), axis=0)
+
+ def _cdf(self, x, *args):
+- k = floor(x)
++ k = floor(x).astype(np.float64)
+ return self._cdfvec(k, *args)
+
+ # generic _logcdf, _sf, _logsf, _ppf, _isf, _rvs defined in rv_generic
+diff --git a/scipy/stats/tests/test_discrete_basic.py b/scipy/stats/tests/test_discrete_basic.py
+index 1ebc9371c075..3db2f0666dbd 100644
+--- a/scipy/stats/tests/test_discrete_basic.py
++++ b/scipy/stats/tests/test_discrete_basic.py
+@@ -549,3 +549,15 @@ def test_rv_sample():
+ rng = np.random.default_rng(98430143469)
+ rvs0 = dist.ppf(rng.random(size=100))
+ assert_allclose(rvs, rvs0)
++
++def test__pmf_float_input():
++ # gh-21272
++ # test that `rvs()` can be computed when `_pmf` requires float input
++
++ class rv_exponential(stats.rv_discrete):
++ def _pmf(self, i):
++ return (2/3)*3**(1 - i)
++
++ rv = rv_exponential(a=0.0, b=float('inf'))
++ rvs = rv.rvs() # should not crash due to integer input to `_pmf`
++ assert_allclose(rvs, 0)
+
+From fe924edb6564358df24de8b915861d6754c6e94d Mon Sep 17 00:00:00 2001
+From: Matt Haberland <mhaberla@calpoly.edu>
+Date: Sat, 10 Aug 2024 12:15:56 -0700
+Subject: [PATCH 2/2] Update scipy/stats/tests/test_discrete_basic.py
+
+[skip ci]
+---
+ scipy/stats/tests/test_discrete_basic.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scipy/stats/tests/test_discrete_basic.py b/scipy/stats/tests/test_discrete_basic.py
+index 3db2f0666dbd..2bc53d95228a 100644
+--- a/scipy/stats/tests/test_discrete_basic.py
++++ b/scipy/stats/tests/test_discrete_basic.py
+@@ -559,5 +559,5 @@ def _pmf(self, i):
+ return (2/3)*3**(1 - i)
+
+ rv = rv_exponential(a=0.0, b=float('inf'))
+- rvs = rv.rvs() # should not crash due to integer input to `_pmf`
++ rvs = rv.rvs(random_state=42) # should not crash due to integer input to `_pmf`
+ assert_allclose(rvs, 0)
diff --git a/dev-python/scipy/scipy-1.14.0-r1.ebuild b/dev-python/scipy/scipy-1.14.0-r1.ebuild
new file mode 100644
index 000000000000..1352c9c3bfbd
--- /dev/null
+++ b/dev-python/scipy/scipy-1.14.0-r1.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+FORTRAN_NEEDED=fortran
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=meson-python
+PYTHON_COMPAT=( pypy3 python3_{10..13} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit flag-o-matic fortran-2 distutils-r1
+
+DESCRIPTION="Scientific algorithms library for Python"
+HOMEPAGE="
+ https://scipy.org/
+ https://github.com/scipy/scipy/
+ https://pypi.org/project/scipy/
+"
+
+if [[ ${PV} == *9999* ]] ; then
+ inherit git-r3
+
+ # Need submodules, so git for now.
+ EGIT_REPO_URI="https://github.com/scipy/scipy"
+ EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
+ EGIT_SUBMODULES=( '*' )
+else
+ inherit pypi
+
+ # Upstream is often behind with doc updates
+ DOC_PV=${PV}
+
+ SRC_URI+="
+ doc? (
+ https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
+ )"
+
+ if [[ ${PV} != *rc* ]] ; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ fi
+fi
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+IUSE="doc +fortran test-rust"
+
+# umfpack is technically optional but it's preferred to have it available.
+DEPEND="
+ >=dev-python/numpy-1.23.5:=[lapack,${PYTHON_USEDEP}]
+ sci-libs/arpack:=
+ sci-libs/umfpack
+ virtual/cblas
+ >=virtual/lapack-3.8
+"
+RDEPEND="
+ ${DEPEND}
+ dev-python/pillow[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-lang/swig
+ >=dev-python/cython-3.0.8[${PYTHON_USEDEP}]
+ >=dev-python/meson-python-0.15.0[${PYTHON_USEDEP}]
+ >=dev-python/pybind11-2.12.0[${PYTHON_USEDEP}]
+ >=dev-build/meson-1.1.0
+ !kernel_Darwin? ( dev-util/patchelf )
+ virtual/pkgconfig
+ doc? ( app-arch/unzip )
+ fortran? (
+ >=dev-python/pythran-0.16.0[${PYTHON_USEDEP}]
+ )
+ test? (
+ >=dev-python/hypothesis-6.30[${PYTHON_USEDEP}]
+ )
+ test-rust? (
+ dev-python/pooch[${PYTHON_USEDEP}]
+ )
+"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/scipy/scipy/pull/21283
+ # (breaks test_sample_scipy in dev-python/sympy)
+ "${FILESDIR}/${P}-np2.patch"
+)
+
+src_unpack() {
+ default
+
+ if use doc; then
+ unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
+ fi
+}
+
+python_configure_all() {
+ DISTUTILS_ARGS=(
+ -Dblas=blas
+ -Dlapack=lapack
+ -Duse-pythran=$(usex fortran true false)
+ )
+
+ # https://bugs.gentoo.org/932721
+ has_version '>=dev-python/numpy-2.0.0' && filter-lto
+}
+
+python_test() {
+ cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
+
+ local EPYTEST_DESELECT=(
+ # Network
+ scipy/datasets/tests/test_data.py::TestDatasets::test_existence_all
+ scipy/datasets/tests/test_data.py::TestDatasets::test_ascent
+ scipy/datasets/tests/test_data.py::TestDatasets::test_face
+ scipy/datasets/tests/test_data.py::TestDatasets::test_electrocardiogram
+
+ # Precision issue with diff. blas?
+ scipy/optimize/tests/test__basinhopping.py::Test_Metropolis::test_gh7799
+
+ # Crashes with assertion, not a regression
+ # https://github.com/scipy/scipy/issues/19321
+ scipy/signal/tests/test_signaltools.py::test_lfilter_bad_object
+
+ # timeouts
+ scipy/sparse/linalg/tests/test_propack.py::test_examples
+ # hang or incredibly slow
+ scipy/optimize/tests/test_lsq_linear.py::TestBVLS::test_large_rank_deficient
+ scipy/optimize/tests/test_lsq_linear.py::TestTRF::test_large_rank_deficient
+
+ # TODO
+ scipy/optimize/tests/test_minimize_constrained.py::TestTrustRegionConstr::test_list_of_problems
+ )
+ local EPYTEST_IGNORE=()
+
+ if ! has_version -b "dev-python/pooch[${PYTHON_USEDEP}]" ; then
+ EPYTEST_IGNORE+=(
+ scipy/datasets/tests/test_data.py
+ )
+ fi
+
+ case ${EPYTHON} in
+ pypy3)
+ EPYTEST_DESELECT+=(
+ # fd leaks in tests
+ # https://github.com/scipy/scipy/issues/19553
+ scipy/fft/_pocketfft/tests/test_real_transforms.py
+ # TODO
+ 'scipy/special/tests/test_data.py::test_boost[<Data for expi: expinti_data_long_ipp-expinti_data_long>]'
+ # missing dict.__ror__
+ # https://github.com/pypy/pypy/issues/4934
+ 'scipy/sparse/tests/test_dok.py::test_dunder_ror[dok_matrix]'
+ # mismatched exception message
+ scipy/optimize/tests/test_hessian_update_strategy.py::TestHessianUpdateStrategy::test_initialize_catch_illegal
+ )
+ ;;
+ python3.13)
+ EPYTEST_DESELECT+=(
+ # docstring formatting
+ scipy/misc/tests/test_doccer.py::test_decorator
+ )
+ ;;
+ esac
+
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest scipy
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
+
+ distutils-r1_python_install_all
+}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/scipy/files/, dev-python/scipy/
@ 2024-09-22 2:23 Michał Górny
0 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2024-09-22 2:23 UTC (permalink / raw
To: gentoo-commits
commit: 86fbcb4a46c77c4f56c05f94a3cf17e170f13fb8
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 22 01:39:54 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Sep 22 02:22:55 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86fbcb4a
dev-python/scipy: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/scipy/Manifest | 1 -
dev-python/scipy/files/scipy-1.14.0-np2.patch | 68 ----------
dev-python/scipy/scipy-1.14.0-r1.ebuild | 173 --------------------------
dev-python/scipy/scipy-1.14.0.ebuild | 167 -------------------------
4 files changed, 409 deletions(-)
diff --git a/dev-python/scipy/Manifest b/dev-python/scipy/Manifest
index 6416455905f3..282cd531d647 100644
--- a/dev-python/scipy/Manifest
+++ b/dev-python/scipy/Manifest
@@ -1,3 +1,2 @@
-DIST scipy-1.14.0.tar.gz 58618870 BLAKE2B bf9ed05628b02dc058555402995caae722cf6802bde80387d4e4477ec533589a66ca70b5dd44a32ddac652c7c69300406434b80e7cbc9aee2a78ae6b26ee4c2b SHA512 6579d988a2093602f5fc82203bbb5dc5690a95032484b5d5bd843d1e7995b3b89d802c7b38ec0345c1f3d8e22c98fb92b3982a1eadfcdf63607f929a52b56abf
DIST scipy-1.14.1.tar.gz 58620554 BLAKE2B 5cb383648a5f3b8d0d321efcd66992212c59ce3fc3dbf812a2fa97c09cb18831b280af6c7689553644f83c531a266e9152e2a139a12aed08307e1ed64deea78e SHA512 20e3cf13590f76dfdc40ca8f90e6d5a68502e74415f37fa24fdb8169098e1d7f0aa631ae742c8c3e9573fa7d63da61986d51f35f090a3785873ae0761f7fcfa6
DIST scipy-html-1.14.0.zip 65723829 BLAKE2B ba47dbf00a5d2a53a9addc5ea68ab18b42f211a018b89aa4b0b57ff0dee02e410a3effc59ddf8fbbc5aa33075d45d86880aed3a14068da5bd7b62ee526199967 SHA512 93be0bafcc64cea1ba130bbcc77c0741acc4f819c84a5030391a22657a1bc63abe8434a2723f66b7ad04c0809dc6d02e3a97ffb8d94bd3d4a4bb759ee796b475
diff --git a/dev-python/scipy/files/scipy-1.14.0-np2.patch b/dev-python/scipy/files/scipy-1.14.0-np2.patch
deleted file mode 100644
index fdb81baa68a6..000000000000
--- a/dev-python/scipy/files/scipy-1.14.0-np2.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 87c4932ca0e4dbe10f918bc5e8096e30fc6557e7 Mon Sep 17 00:00:00 2001
-From: Lucas Colley <lucas.colley8@gmail.com>
-Date: Mon, 29 Jul 2024 17:57:11 +0100
-Subject: [PATCH 1/2] BUG: stats: adapt to `np.floor` type promotion removal
-
-`rv_discrete._cdf` relied on `np.floor` promoting its integer input to `np.float64`. This is no longer the case since numpy/numpy#26766.
-
-[skip cirrus] [skip circle]
----
- scipy/stats/_distn_infrastructure.py | 2 +-
- scipy/stats/tests/test_discrete_basic.py | 12 ++++++++++++
- 2 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/scipy/stats/_distn_infrastructure.py b/scipy/stats/_distn_infrastructure.py
-index a7a0bb66b396..83954af2c11f 100644
---- a/scipy/stats/_distn_infrastructure.py
-+++ b/scipy/stats/_distn_infrastructure.py
-@@ -3392,7 +3392,7 @@ def _cdf_single(self, k, *args):
- return np.sum(self._pmf(m, *args), axis=0)
-
- def _cdf(self, x, *args):
-- k = floor(x)
-+ k = floor(x).astype(np.float64)
- return self._cdfvec(k, *args)
-
- # generic _logcdf, _sf, _logsf, _ppf, _isf, _rvs defined in rv_generic
-diff --git a/scipy/stats/tests/test_discrete_basic.py b/scipy/stats/tests/test_discrete_basic.py
-index 1ebc9371c075..3db2f0666dbd 100644
---- a/scipy/stats/tests/test_discrete_basic.py
-+++ b/scipy/stats/tests/test_discrete_basic.py
-@@ -549,3 +549,15 @@ def test_rv_sample():
- rng = np.random.default_rng(98430143469)
- rvs0 = dist.ppf(rng.random(size=100))
- assert_allclose(rvs, rvs0)
-+
-+def test__pmf_float_input():
-+ # gh-21272
-+ # test that `rvs()` can be computed when `_pmf` requires float input
-+
-+ class rv_exponential(stats.rv_discrete):
-+ def _pmf(self, i):
-+ return (2/3)*3**(1 - i)
-+
-+ rv = rv_exponential(a=0.0, b=float('inf'))
-+ rvs = rv.rvs() # should not crash due to integer input to `_pmf`
-+ assert_allclose(rvs, 0)
-
-From fe924edb6564358df24de8b915861d6754c6e94d Mon Sep 17 00:00:00 2001
-From: Matt Haberland <mhaberla@calpoly.edu>
-Date: Sat, 10 Aug 2024 12:15:56 -0700
-Subject: [PATCH 2/2] Update scipy/stats/tests/test_discrete_basic.py
-
-[skip ci]
----
- scipy/stats/tests/test_discrete_basic.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scipy/stats/tests/test_discrete_basic.py b/scipy/stats/tests/test_discrete_basic.py
-index 3db2f0666dbd..2bc53d95228a 100644
---- a/scipy/stats/tests/test_discrete_basic.py
-+++ b/scipy/stats/tests/test_discrete_basic.py
-@@ -559,5 +559,5 @@ def _pmf(self, i):
- return (2/3)*3**(1 - i)
-
- rv = rv_exponential(a=0.0, b=float('inf'))
-- rvs = rv.rvs() # should not crash due to integer input to `_pmf`
-+ rvs = rv.rvs(random_state=42) # should not crash due to integer input to `_pmf`
- assert_allclose(rvs, 0)
diff --git a/dev-python/scipy/scipy-1.14.0-r1.ebuild b/dev-python/scipy/scipy-1.14.0-r1.ebuild
deleted file mode 100644
index 1352c9c3bfbd..000000000000
--- a/dev-python/scipy/scipy-1.14.0-r1.ebuild
+++ /dev/null
@@ -1,173 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-FORTRAN_NEEDED=fortran
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=meson-python
-PYTHON_COMPAT=( pypy3 python3_{10..13} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit flag-o-matic fortran-2 distutils-r1
-
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="
- https://scipy.org/
- https://github.com/scipy/scipy/
- https://pypi.org/project/scipy/
-"
-
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- # Need submodules, so git for now.
- EGIT_REPO_URI="https://github.com/scipy/scipy"
- EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
- EGIT_SUBMODULES=( '*' )
-else
- inherit pypi
-
- # Upstream is often behind with doc updates
- DOC_PV=${PV}
-
- SRC_URI+="
- doc? (
- https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
- )"
-
- if [[ ${PV} != *rc* ]] ; then
- KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
- fi
-fi
-
-LICENSE="BSD LGPL-2"
-SLOT="0"
-IUSE="doc +fortran test-rust"
-
-# umfpack is technically optional but it's preferred to have it available.
-DEPEND="
- >=dev-python/numpy-1.23.5:=[lapack,${PYTHON_USEDEP}]
- sci-libs/arpack:=
- sci-libs/umfpack
- virtual/cblas
- >=virtual/lapack-3.8
-"
-RDEPEND="
- ${DEPEND}
- dev-python/pillow[${PYTHON_USEDEP}]
-"
-BDEPEND="
- dev-lang/swig
- >=dev-python/cython-3.0.8[${PYTHON_USEDEP}]
- >=dev-python/meson-python-0.15.0[${PYTHON_USEDEP}]
- >=dev-python/pybind11-2.12.0[${PYTHON_USEDEP}]
- >=dev-build/meson-1.1.0
- !kernel_Darwin? ( dev-util/patchelf )
- virtual/pkgconfig
- doc? ( app-arch/unzip )
- fortran? (
- >=dev-python/pythran-0.16.0[${PYTHON_USEDEP}]
- )
- test? (
- >=dev-python/hypothesis-6.30[${PYTHON_USEDEP}]
- )
- test-rust? (
- dev-python/pooch[${PYTHON_USEDEP}]
- )
-"
-
-EPYTEST_XDIST=1
-distutils_enable_tests pytest
-
-PATCHES=(
- # https://github.com/scipy/scipy/pull/21283
- # (breaks test_sample_scipy in dev-python/sympy)
- "${FILESDIR}/${P}-np2.patch"
-)
-
-src_unpack() {
- default
-
- if use doc; then
- unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
- fi
-}
-
-python_configure_all() {
- DISTUTILS_ARGS=(
- -Dblas=blas
- -Dlapack=lapack
- -Duse-pythran=$(usex fortran true false)
- )
-
- # https://bugs.gentoo.org/932721
- has_version '>=dev-python/numpy-2.0.0' && filter-lto
-}
-
-python_test() {
- cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
-
- local EPYTEST_DESELECT=(
- # Network
- scipy/datasets/tests/test_data.py::TestDatasets::test_existence_all
- scipy/datasets/tests/test_data.py::TestDatasets::test_ascent
- scipy/datasets/tests/test_data.py::TestDatasets::test_face
- scipy/datasets/tests/test_data.py::TestDatasets::test_electrocardiogram
-
- # Precision issue with diff. blas?
- scipy/optimize/tests/test__basinhopping.py::Test_Metropolis::test_gh7799
-
- # Crashes with assertion, not a regression
- # https://github.com/scipy/scipy/issues/19321
- scipy/signal/tests/test_signaltools.py::test_lfilter_bad_object
-
- # timeouts
- scipy/sparse/linalg/tests/test_propack.py::test_examples
- # hang or incredibly slow
- scipy/optimize/tests/test_lsq_linear.py::TestBVLS::test_large_rank_deficient
- scipy/optimize/tests/test_lsq_linear.py::TestTRF::test_large_rank_deficient
-
- # TODO
- scipy/optimize/tests/test_minimize_constrained.py::TestTrustRegionConstr::test_list_of_problems
- )
- local EPYTEST_IGNORE=()
-
- if ! has_version -b "dev-python/pooch[${PYTHON_USEDEP}]" ; then
- EPYTEST_IGNORE+=(
- scipy/datasets/tests/test_data.py
- )
- fi
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # fd leaks in tests
- # https://github.com/scipy/scipy/issues/19553
- scipy/fft/_pocketfft/tests/test_real_transforms.py
- # TODO
- 'scipy/special/tests/test_data.py::test_boost[<Data for expi: expinti_data_long_ipp-expinti_data_long>]'
- # missing dict.__ror__
- # https://github.com/pypy/pypy/issues/4934
- 'scipy/sparse/tests/test_dok.py::test_dunder_ror[dok_matrix]'
- # mismatched exception message
- scipy/optimize/tests/test_hessian_update_strategy.py::TestHessianUpdateStrategy::test_initialize_catch_illegal
- )
- ;;
- python3.13)
- EPYTEST_DESELECT+=(
- # docstring formatting
- scipy/misc/tests/test_doccer.py::test_decorator
- )
- ;;
- esac
-
- local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
- epytest scipy
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
-
- distutils-r1_python_install_all
-}
diff --git a/dev-python/scipy/scipy-1.14.0.ebuild b/dev-python/scipy/scipy-1.14.0.ebuild
deleted file mode 100644
index d92a8af88f7a..000000000000
--- a/dev-python/scipy/scipy-1.14.0.ebuild
+++ /dev/null
@@ -1,167 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-FORTRAN_NEEDED=fortran
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=meson-python
-PYTHON_COMPAT=( pypy3 python3_{10..13} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit flag-o-matic fortran-2 distutils-r1
-
-DESCRIPTION="Scientific algorithms library for Python"
-HOMEPAGE="
- https://scipy.org/
- https://github.com/scipy/scipy/
- https://pypi.org/project/scipy/
-"
-
-if [[ ${PV} == *9999* ]] ; then
- inherit git-r3
-
- # Need submodules, so git for now.
- EGIT_REPO_URI="https://github.com/scipy/scipy"
- EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
- EGIT_SUBMODULES=( '*' )
-else
- inherit pypi
-
- # Upstream is often behind with doc updates
- DOC_PV=${PV}
-
- SRC_URI+="
- doc? (
- https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
- )"
-
- if [[ ${PV} != *rc* ]] ; then
- KEYWORDS="amd64 arm arm64 ~loong ~ppc ppc64 ~riscv ~s390 ~sparc x86"
- fi
-fi
-
-LICENSE="BSD LGPL-2"
-SLOT="0"
-IUSE="doc +fortran test-rust"
-
-# umfpack is technically optional but it's preferred to have it available.
-DEPEND="
- >=dev-python/numpy-1.23.5:=[lapack,${PYTHON_USEDEP}]
- sci-libs/arpack:=
- sci-libs/umfpack
- virtual/cblas
- >=virtual/lapack-3.8
-"
-RDEPEND="
- ${DEPEND}
- dev-python/pillow[${PYTHON_USEDEP}]
-"
-BDEPEND="
- dev-lang/swig
- >=dev-python/cython-3.0.8[${PYTHON_USEDEP}]
- >=dev-python/meson-python-0.15.0[${PYTHON_USEDEP}]
- >=dev-python/pybind11-2.12.0[${PYTHON_USEDEP}]
- >=dev-build/meson-1.1.0
- !kernel_Darwin? ( dev-util/patchelf )
- virtual/pkgconfig
- doc? ( app-arch/unzip )
- fortran? (
- >=dev-python/pythran-0.16.0[${PYTHON_USEDEP}]
- )
- test? (
- >=dev-python/hypothesis-6.30[${PYTHON_USEDEP}]
- )
- test-rust? (
- dev-python/pooch[${PYTHON_USEDEP}]
- )
-"
-
-EPYTEST_XDIST=1
-distutils_enable_tests pytest
-
-src_unpack() {
- default
-
- if use doc; then
- unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die
- fi
-}
-
-python_configure_all() {
- DISTUTILS_ARGS=(
- -Dblas=blas
- -Dlapack=lapack
- -Duse-pythran=$(usex fortran true false)
- )
-
- # https://bugs.gentoo.org/932721
- has_version '>=dev-python/numpy-2.0.0' && filter-lto
-}
-
-python_test() {
- cd "${BUILD_DIR}/install$(python_get_sitedir)" || die
-
- local EPYTEST_DESELECT=(
- # Network
- scipy/datasets/tests/test_data.py::TestDatasets::test_existence_all
- scipy/datasets/tests/test_data.py::TestDatasets::test_ascent
- scipy/datasets/tests/test_data.py::TestDatasets::test_face
- scipy/datasets/tests/test_data.py::TestDatasets::test_electrocardiogram
-
- # Precision issue with diff. blas?
- scipy/optimize/tests/test__basinhopping.py::Test_Metropolis::test_gh7799
-
- # Crashes with assertion, not a regression
- # https://github.com/scipy/scipy/issues/19321
- scipy/signal/tests/test_signaltools.py::test_lfilter_bad_object
-
- # timeouts
- scipy/sparse/linalg/tests/test_propack.py::test_examples
- # hang or incredibly slow
- scipy/optimize/tests/test_lsq_linear.py::TestBVLS::test_large_rank_deficient
- scipy/optimize/tests/test_lsq_linear.py::TestTRF::test_large_rank_deficient
-
- # TODO
- scipy/optimize/tests/test_minimize_constrained.py::TestTrustRegionConstr::test_list_of_problems
- )
- local EPYTEST_IGNORE=()
-
- if ! has_version -b "dev-python/pooch[${PYTHON_USEDEP}]" ; then
- EPYTEST_IGNORE+=(
- scipy/datasets/tests/test_data.py
- )
- fi
-
- case ${EPYTHON} in
- pypy3)
- EPYTEST_DESELECT+=(
- # fd leaks in tests
- # https://github.com/scipy/scipy/issues/19553
- scipy/fft/_pocketfft/tests/test_real_transforms.py
- # TODO
- 'scipy/special/tests/test_data.py::test_boost[<Data for expi: expinti_data_long_ipp-expinti_data_long>]'
- # missing dict.__ror__
- # https://github.com/pypy/pypy/issues/4934
- 'scipy/sparse/tests/test_dok.py::test_dunder_ror[dok_matrix]'
- # mismatched exception message
- scipy/optimize/tests/test_hessian_update_strategy.py::TestHessianUpdateStrategy::test_initialize_catch_illegal
- )
- ;;
- python3.13)
- EPYTEST_DESELECT+=(
- # docstring formatting
- scipy/misc/tests/test_doccer.py::test_decorator
- )
- ;;
- esac
-
- local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
- epytest scipy
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
-
- distutils-r1_python_install_all
-}
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-09-22 2:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-22 2:23 [gentoo-commits] repo/gentoo:master commit in: dev-python/scipy/files/, dev-python/scipy/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2024-08-13 20:41 Michał Górny
2024-07-13 19:25 Michał Górny
2024-07-05 19:04 Michał Górny
2023-06-27 10:56 Sam James
2022-06-24 3:58 Michał Górny
2021-11-05 5:56 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox