summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-07-09 08:30:52 +0100
committerSam James <sam@gentoo.org>2023-07-09 08:30:52 +0100
commitb0e86c8da8f8fc1dd638d60091cc22ce93d6f1a9 (patch)
tree9e65d8bc58a8da8db64f0de428097bc438262543
parentmedia-libs/harfbuzz: add 8.0.0 (diff)
downloadgentoo-b0e86c8da8f8fc1dd638d60091cc22ce93d6f1a9.tar.gz
gentoo-b0e86c8da8f8fc1dd638d60091cc22ce93d6f1a9.tar.bz2
gentoo-b0e86c8da8f8fc1dd638d60091cc22ce93d6f1a9.zip
dev-python/numpy: add 1.25.1
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-python/numpy/Manifest1
-rw-r--r--dev-python/numpy/numpy-1.25.1.ebuild147
2 files changed, 148 insertions, 0 deletions
diff --git a/dev-python/numpy/Manifest b/dev-python/numpy/Manifest
index 5eb0b49cbb50..e13da7f134ae 100644
--- a/dev-python/numpy/Manifest
+++ b/dev-python/numpy/Manifest
@@ -3,3 +3,4 @@ DIST numpy-1.24.2.tar.gz 10906862 BLAKE2B e48f65eab709f0c57ec378d813a7b65bcaca6d
DIST numpy-1.24.3.tar.gz 10909904 BLAKE2B 3b14f8b6a7bd484de43c3b0e57f161388d6226e05ed9bc3d1edfaafc713b9597c7574b9b9c20b4e3a6bd291d32a607d95c72d6e25fa346ffdaf97c94767bc315 SHA512 d4b5841cbe68ee6653f99018e4e0182f2e5519a1cd69c14e0a95aa180f878e6a6786ccf0a7c78bf0d511c53e7535d7144fee428572dec7a4b60b25c8a1c0c9e1
DIST numpy-1.24.4.tar.gz 10911229 BLAKE2B 2f054b4ede249653707c3df8ccf6df31b747c0625891ae6e01134f84b02d1300e1d7a88b5741e0e0f05218673d95374f263e5bfddbf17c9510aa93bac002eafc SHA512 89eb90548ad4f38cfe0a5077eef426058eed08ca17633024887e4d0ff5bdfe98736b1ad6850fe643bc0035d55ac4cd39b5971895eea9dcf247b5ff186654ed68
DIST numpy-1.25.0.tar.gz 10426700 BLAKE2B 9a6c9b7e1172a21ec7cc3b2a0b292308ed7a859072ba73cac3c472cd60f45acd66032f24df19bddef8aa0aee7a243e21d3fa04b68f1383efc6af834cdc04b589 SHA512 e464d82bba0487f520ec7a820492343af5172e807e0f746688bbaff636a31947da62704ef0f35c74a46fb42332f4644f3c497d544789d22e5c01ca0823f82909
+DIST numpy-1.25.1.tar.gz 10428993 BLAKE2B ee3edaf5416ac858b995f0cb8df75962af01619969a2c70fa10b4e0d0a1c96a3b441ee470a463cdb7c60910d8823af1c41d37933f87bcaa0a724655d052ed20a SHA512 69cc5426f657a21a6a1fb3bb043b8acec90b87969f90177abb6d7294ca96d04f723ddf90fa40822704b16147a390abafbcda9702e40405ea6b6e22377aade71d
diff --git a/dev-python/numpy/numpy-1.25.1.ebuild b/dev-python/numpy/numpy-1.25.1.ebuild
new file mode 100644
index 000000000000..2d4c86241ee9
--- /dev/null
+++ b/dev-python/numpy/numpy-1.25.1.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=meson-python
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+PYTHON_REQ_USE="threads(+)"
+FORTRAN_NEEDED=lapack
+
+inherit distutils-r1 flag-o-matic fortran-2 multiprocessing pypi toolchain-funcs
+
+DESCRIPTION="Fast array and numerical python library"
+HOMEPAGE="
+ https://numpy.org/
+ https://github.com/numpy/numpy/
+ https://pypi.org/project/numpy/
+"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="lapack"
+if [[ ${PV} != *_rc* ]] ; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc64 ~s390 ~sparc ~x86"
+fi
+
+RDEPEND="
+ lapack? (
+ >=virtual/cblas-3.8
+ >=virtual/lapack-3.8
+ )
+"
+BDEPEND="
+ ${RDEPEND}
+ >=dev-util/meson-1.1.0
+ <dev-python/cython-3[${PYTHON_USEDEP}]
+ >=dev-python/cython-0.29.30[${PYTHON_USEDEP}]
+ lapack? (
+ virtual/pkgconfig
+ )
+ test? (
+ $(python_gen_cond_dep '
+ >=dev-python/cffi-1.14.0[${PYTHON_USEDEP}]
+ ' 'python*')
+ dev-python/charset-normalizer[${PYTHON_USEDEP}]
+ >=dev-python/hypothesis-5.8.0[${PYTHON_USEDEP}]
+ dev-python/pytest-xdist[${PYTHON_USEDEP}]
+ >=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.25.0_rc1-meson-pyproject.toml.patch
+ "${FILESDIR}"/${PN}-1.25.0-skip-python3.12-irrelevant-tests.patch
+)
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ append-flags -fno-strict-aliasing
+
+ distutils-r1_python_prepare_all
+
+ # TODO: Please drop once 1.25.0_rc1-meson-pyproject.toml.patch is gone
+ sed -i -e "s:version = \"2.0.0.dev0\":version = \"${PV}\":" pyproject.toml || die
+}
+
+python_configure_all() {
+ DISTUTILS_ARGS=(
+ -Dblas=$(usev lapack cblas)
+ -Dlapack=$(usev lapack lapack)
+ )
+}
+
+python_test() {
+ local EPYTEST_DESELECT=(
+ # very disk-and-memory-hungry
+ lib/tests/test_io.py::test_large_zip
+
+ # precision problems
+ core/tests/test_umath_accuracy.py::TestAccuracy::test_validate_transcendentals
+
+ # runs the whole test suite recursively, that's just crazy
+ core/tests/test_mem_policy.py::test_new_policy
+
+ typing/tests/test_typing.py
+ )
+
+ if [[ ${EPYTHON} == pypy3 ]]; then
+ EPYTEST_DESELECT+=(
+ # TODO: crashed
+ lib/tests/test_histograms.py::TestHistogram::test_big_arrays
+ )
+ fi
+
+ if use arm && [[ $(uname -m || echo "unknown") == "armv8l" ]] ; then
+ # Degenerate case. arm32 chroot on arm64.
+ # bug #774108
+ EPYTEST_DESELECT+=(
+ core/tests/test_cpu_features.py::Test_ARM_Features::test_features
+ )
+ fi
+
+ if use x86 ; then
+ EPYTEST_DESELECT+=(
+ # https://github.com/numpy/numpy/issues/18388
+ core/tests/test_umath.py::TestRemainder::test_float_remainder_overflow
+ # https://github.com/numpy/numpy/issues/18387
+ random/tests/test_generator_mt19937.py::TestRandomDist::test_pareto
+ # more precision problems
+ core/tests/test_einsum.py::TestEinsum::test_einsum_sums_int16
+ )
+ fi
+
+ if [[ $(tc-endian) == "big" ]] ; then
+ # https://github.com/numpy/numpy/issues/11831 and bug #707116
+ EPYTEST_DESELECT+=(
+ 'f2py/tests/test_return_character.py::TestFReturnCharacter::test_all_f77[s1]'
+ 'f2py/tests/test_return_character.py::TestFReturnCharacter::test_all_f90[t1]'
+ 'f2py/tests/test_return_character.py::TestFReturnCharacter::test_all_f90[s1]'
+ 'f2py/tests/test_return_character.py::TestFReturnCharacter::test_all_f77[t1]'
+ )
+ fi
+
+ case "${ABI}" in
+ alpha|arm|hppa|m68k|o32|ppc|s390|sh|sparc|x86)
+ EPYTEST_DESELECT+=(
+ # too large for 32-bit platforms
+ core/tests/test_ufunc.py::TestUfunc::test_identityless_reduction_huge_array
+ 'core/tests/test_multiarray.py::TestDot::test_huge_vectordot[float64]'
+ 'core/tests/test_multiarray.py::TestDot::test_huge_vectordot[complex128]'
+ lib/tests/test_histograms.py::TestHistogram::test_big_arrays
+ )
+ ;;
+ *)
+ ;;
+ esac
+
+ rm -rf numpy || die
+ epytest -n "$(makeopts_jobs)" --pyargs numpy
+}
+
+python_install_all() {
+ local DOCS=( LICENSE.txt README.md THANKS.txt )
+ distutils-r1_python_install_all
+}