diff options
| -rw-r--r-- | dev-python/scipy/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/scipy/scipy-1.16.1.ebuild | 171 |
2 files changed, 173 insertions, 0 deletions
diff --git a/dev-python/scipy/Manifest b/dev-python/scipy/Manifest index b0b4ab859047..71cbd743a9ad 100644 --- a/dev-python/scipy/Manifest +++ b/dev-python/scipy/Manifest @@ -1,4 +1,6 @@ DIST scipy-1.15.3.tar.gz 59419214 BLAKE2B 526e6182e4991e52fea69452b7894b203d31089ee1f8640ef1bff8f1fa57c31a7179a1ab82325689f3b0a7b907c34adb64b80e640780c99e166f6999adbb1524 SHA512 009de94a64c9361b261788ef3577d636a20ca23ff5c8f12f5e19a4ba4d6177ef7ade0cf1a5ee740bd1c6d740193d70b314d1abd83ab65fcb5d5cf2d2ba06bfb1 DIST scipy-1.16.0.tar.gz 30581216 BLAKE2B faab7755584acfb6f2aa6a9e36a1fef840212d9b2478002313b94fd3762317be3d705e09d10960146bfbed5274cab80bd2170ce5bc3368b5ab860e8b5fe2f346 SHA512 6a88cc1b2f3e4cc7c4d867238965521e41b0394614a5ffcc7179b379dad20c0889a7ce4195ef676e78d7aa8d6f83f88f1380da8b225b59c4b6b87a9e6579efb7 +DIST scipy-1.16.1.tar.gz 30580861 BLAKE2B 1013d6658d060954fe1bcebf418351c447a9edcbf811b0de170870f566ffa0f4f7d40b065cdd74dbaebb8c537e8e0384ab4e8e4638995e4b7652288536e86126 SHA512 979a74b9700de0e9731677c056830b1ad108a7376462e43a2a2523addc88bcd3580b84f73552b581d60a3d8774884545d42551f36111334a40268a41ab2513ba DIST scipy-html-1.15.3.zip 68590525 BLAKE2B f6473e273843e3eb2aa791be1b885a11ac2b77accdf00ea2d7bc78dc59228dede66259ff4d2ac616ceeb3152a80a8036226622240d963a8bce51dc0143b6aea4 SHA512 df59c2a53dc9c8a64631a2c9906762de046b9beefd759e0810afdcbb00e4da8800e83902d49fa81d791bccb0ed190e00f0ea4948b855e97ad9b5d7a0984d4eec DIST scipy-html-1.16.0.zip 71540070 BLAKE2B eca4f76e6e3f4747e8e6a1c432c7b9fd52638ae37e00f50733b3eb7bc9f165f507478a8331b3420f158a5f316ba72c0925bf8933b9392638f1d346871fb5dd0a SHA512 839cf7511d7dce320da2966c45ff62056f93b35687e6fd42f2b0725dd4389f50a8ce69d125043de2632861b0bf5187af591558f9019e3543825255edd2372c12 +DIST scipy-html-1.16.1.zip 71509503 BLAKE2B b2500a21a3b52fc0bb2c1ee2dfb085d84fd03537d89f8d65fc8e2ebce88aafb4641fa2edc982e5e665af173687323318df998dd0dae022e99ea5341bf6c57264 SHA512 6477db2dcc485c7798bcdc5f1b8fc617b5981efb3675df40259a99d6fb130b3523eca191fcdd31b31dc58f47d77366ca34d488d77a57648c50acdef80c25b36e diff --git a/dev-python/scipy/scipy-1.16.1.ebuild b/dev-python/scipy/scipy-1.16.1.ebuild new file mode 100644 index 000000000000..a88dea60d034 --- /dev/null +++ b/dev-python/scipy/scipy-1.16.1.ebuild @@ -0,0 +1,171 @@ +# 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=${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" + +# 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. +COMMON_DEPEND=" + >=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 +" +# Only boost.math is used, and meson.build doesn't even look up specific boost modules. +# Exact version is enforced upstream, so building will fail if subslot isn't enforced. +DEPEND=" + ${COMMON_DEPEND} + dev-libs/boost:0/1.88.0 +" +RDEPEND=" + ${COMMON_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.5.0 + !kernel_Darwin? ( dev-util/patchelf ) + virtual/pkgconfig + doc? ( app-arch/unzip ) + fortran? ( + >=dev-python/pythran-0.16.0[${PYTHON_USEDEP}] + ) + test-rust? ( + dev-python/pooch[${PYTHON_USEDEP}] + ) +" + +EPYTEST_PLUGINS=( hypothesis ) +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) + # 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 + + # 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 +} |
