commit:     9726336661ee46041eba8af796d7caaa391f47c8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu May 22 12:19:53 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri May 23 15:26:30 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97263366

dev-python/scipy: Bump to 1.16.0_rc1

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/scipy/Manifest                          |   1 +
 dev-python/scipy/files/scipy-1.16.0_rc1-pypy.patch |  24 +++
 dev-python/scipy/scipy-1.16.0_rc1.ebuild           | 174 +++++++++++++++++++++
 3 files changed, 199 insertions(+)

diff --git a/dev-python/scipy/Manifest b/dev-python/scipy/Manifest
index 7b4dc5823d6d..74dcf01a4d78 100644
--- a/dev-python/scipy/Manifest
+++ b/dev-python/scipy/Manifest
@@ -1,4 +1,5 @@
 DIST scipy-1.15.2.tar.gz 59417316 BLAKE2B 
7ae748a58b6a7fb2674dc6627c3d6f4f28694283bf19ca9973fcf5796ccb0e2e35bb7cd8fbfbefa21cb832b771e563f478bc09ded61d989ea47625e7ac35e1bd
 SHA512 
e772aa040622ef457478e08eb41471af33784cafc2022f091a30563f6abed067cdbae424a5ae86f9dab8c1adc67276794b67cb7cb7c7963ca55a38529df63834
 DIST scipy-1.15.3.tar.gz 59419214 BLAKE2B 
526e6182e4991e52fea69452b7894b203d31089ee1f8640ef1bff8f1fa57c31a7179a1ab82325689f3b0a7b907c34adb64b80e640780c99e166f6999adbb1524
 SHA512 
009de94a64c9361b261788ef3577d636a20ca23ff5c8f12f5e19a4ba4d6177ef7ade0cf1a5ee740bd1c6d740193d70b314d1abd83ab65fcb5d5cf2d2ba06bfb1
+DIST scipy-1.16.0rc1.tar.gz 30582387 BLAKE2B 
cc356de35aa7a821c3e363997ab014765df800ab8229c34b04d42088221391199b0726ff3d6cc09b5698aa1970d451a4f79993bb684f2f62d3c38a2a28e34149
 SHA512 
31c9fe5da1de08ebd7773040c2ac6de5d1d62daf4e52d95b78eacba93e0fcfcc91e97b672796d3084d2b48dc6718ba7e8b08daa91407b88449df727db349bf3f
 DIST scipy-html-1.15.2.zip 68568078 BLAKE2B 
270f1d89bbcb707616f7af0e1bd90909c1f33d647cf55e42dbf27128ecd90f619f0d579d8897eb04851b6327df1682236c5fd9c4c948b1fd99b083145681a202
 SHA512 
48e09d3678547775c6c86b82cdb4ef5e7eed7722c6ba8d53170384c3a9380b2bb29fc467b5ee66ae2ec1a621930c8bf20adfc8db3a75546a6ba8e9906df03426
 DIST scipy-html-1.15.3.zip 68590525 BLAKE2B 
f6473e273843e3eb2aa791be1b885a11ac2b77accdf00ea2d7bc78dc59228dede66259ff4d2ac616ceeb3152a80a8036226622240d963a8bce51dc0143b6aea4
 SHA512 
df59c2a53dc9c8a64631a2c9906762de046b9beefd759e0810afdcbb00e4da8800e83902d49fa81d791bccb0ed190e00f0ea4948b855e97ad9b5d7a0984d4eec

diff --git a/dev-python/scipy/files/scipy-1.16.0_rc1-pypy.patch 
b/dev-python/scipy/files/scipy-1.16.0_rc1-pypy.patch
new file mode 100644
index 000000000000..ccbdf37fa32a
--- /dev/null
+++ b/dev-python/scipy/files/scipy-1.16.0_rc1-pypy.patch
@@ -0,0 +1,24 @@
+diff --git a/scipy/stats/_stats_mstats_common.py 
b/scipy/stats/_stats_mstats_common.py
+index 9a621016e..3a0ec400d 100644
+--- a/scipy/stats/_stats_mstats_common.py
++++ b/scipy/stats/_stats_mstats_common.py
+@@ -21,7 +21,8 @@ def _n_samples_optional_x(kwargs):
+ 
+ @_axis_nan_policy_factory(TheilslopesResult, default_axis=None, n_outputs=4,
+                           n_samples=_n_samples_optional_x,
+-                          result_to_tuple=tuple, paired=True, too_small=1)
++                          result_to_tuple=lambda x, _: tuple(x), paired=True,
++                          too_small=1)
+ def theilslopes(y, x=None, alpha=0.95, method='separate'):
+     r"""
+     Computes the Theil-Sen estimator for a set of points (x, y).
+@@ -204,7 +205,8 @@ def _find_repeats(arr):
+ 
+ @_axis_nan_policy_factory(SiegelslopesResult, default_axis=None, n_outputs=2,
+                           n_samples=_n_samples_optional_x,
+-                          result_to_tuple=tuple, paired=True, too_small=1)
++                          result_to_tuple=lambda x, _: tuple(x), paired=True,
++                          too_small=1)
+ def siegelslopes(y, x=None, method="hierarchical"):
+     r"""
+     Computes the Siegel estimator for a set of points (x, y).

diff --git a/dev-python/scipy/scipy-1.16.0_rc1.ebuild 
b/dev-python/scipy/scipy-1.16.0_rc1.ebuild
new file mode 100644
index 000000000000..4da657d5ce70
--- /dev/null
+++ b/dev-python/scipy/scipy-1.16.0_rc1.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2025 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_11 python3_{11..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=1.15.3
+
+       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"
+
+# pythran is needed in both BDEPEND (for /usr/bin/pythran) and in DEPEND
+# to actually compile code generated by pythran (headers and such needed).
+#
+# umfpack is technically optional but it's preferred to have it available.
+DEPEND="
+       dev-libs/boost:=
+       >=dev-python/numpy-1.23.5:=[lapack,${PYTHON_USEDEP}]
+       ~media-libs/qhull-2020.2:=
+       sci-libs/arpack:=
+       sci-libs/umfpack
+       virtual/cblas
+       >=virtual/lapack-3.8
+"
+RDEPEND="
+       ${DEPEND}
+       dev-python/pillow[${PYTHON_USEDEP}]
+"
+DEPEND+="
+       fortran? (
+               >=dev-python/pythran-0.16.0[${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.13.2[${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=(
+       # a subset of https://github.com/scipy/scipy/pull/23044
+       "${FILESDIR}/${P}-pypy.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)
+               # note: recheck on version bumps, upstream is planning
+               # to allow more
+               '-Duse-system-libraries=boost.math,qhull'
+       )
+
+       # 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
+
+               # Crashes with assertion, not a regression
+               # https://github.com/scipy/scipy/issues/19321
+               scipy/signal/tests/test_signaltools.py::test_lfilter_bad_object
+
+               # Awfully slow tests
+               scipy/interpolate/tests/test_bsplines.py::TestBatch::test_batch
+               
scipy/linalg/tests/test_basic.py::TestLstsq::test_random_complex_exact
+               
scipy/sparse/linalg/_eigen/tests/test_svds.py::test_small_sigma_sparse
+
+               # TODO: minor precision errors
+               
'scipy/linalg/tests/test_batch.py::TestBatch::test_solve[float32-bdim2]'
+               
'scipy/linalg/tests/test_batch.py::TestBatch::test_lu_solve[float32-bdim2]'
+
+               # Crashes, probably too big
+               
'scipy/interpolate/tests/test_fitpack2.py::TestRectBivariateSpline::test_spline_large_2d_maxit'
+       )
+       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+=(
+                               # TODO
+                               scipy/special/tests/test_data.py::test_boost
+                               
scipy/_lib/tests/test_ccallback.py::test_callbacks
+                       )
+                       ;;
+       esac
+
+       local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+       # avoid other stuff being multithreaded when using xdist
+       local -x PYTHON_CPU_COUNT=1
+       epytest scipy
+}
+
+python_install_all() {
+       use doc && local HTML_DOCS=( "${WORKDIR}"/html/. )
+
+       distutils-r1_python_install_all
+}

Reply via email to