diff --git a/srcpkgs/python3-numpy/files/fenv-constants.patch b/srcpkgs/python3-numpy/files/fenv-constants.patch index 987ad4e346f..075cac8a082 100644 --- a/srcpkgs/python3-numpy/files/fenv-constants.patch +++ b/srcpkgs/python3-numpy/files/fenv-constants.patch @@ -1,11 +1,11 @@ ---- numpy/core/src/npymath/ieee754.c.src 2020-09-20 14:53:51.998825328 +1000 -+++ numpy/core/src/npymath/ieee754.c.src 2020-09-20 14:54:03.611889518 +1000 +--- numpy/_core/src/npymath/ieee754.c.src.orig 2024-07-02 11:50:48.519261116 -0400 ++++ numpy/_core/src/npymath/ieee754.c.src 2024-07-02 11:51:06.336360850 -0400 @@ -8,6 +8,8 @@ #include "npy_math_private.h" #include "numpy/utils.h" +#include "fenv-constants.h" + - #ifndef HAVE_COPYSIGN - double npy_copysign(double x, double y) - { + /* + The below code is provided for compilers which do not yet provide C11 compatibility (gcc 4.5 and older) + */ diff --git a/srcpkgs/python3-numpy/patches/fix-pytest-warning.patch b/srcpkgs/python3-numpy/patches/fix-pytest-warning.patch deleted file mode 100644 index 990ab801975..00000000000 --- a/srcpkgs/python3-numpy/patches/fix-pytest-warning.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/pytest.ini 2023-06-16 22:48:37.211072200 -0300 -+++ b/pytest.ini 2023-06-19 22:52:00.230063231 -0300 -@@ -27,3 +27,5 @@ - ignore:\n\n `numpy.distutils`:DeprecationWarning - # Ignore mypy >= 0.971 DeprecationWarnings - ignore:path is deprecated\. Use files\(\) instead:DeprecationWarning:mypy -+# Ignore warning raised when importing setuptools.command. -+ ignore:pkg_resources is deprecated as an API:DeprecationWarning diff --git a/srcpkgs/python3-numpy/patches/version-relaxation.patch b/srcpkgs/python3-numpy/patches/version-relaxation.patch deleted file mode 100644 index f36972e5cc9..00000000000 --- a/srcpkgs/python3-numpy/patches/version-relaxation.patch +++ /dev/null @@ -1,14 +0,0 @@ -As with SciPy, NumPy abuses specifications of *build requirements* as a means -to control the environment under which wheels are built for distribution. - ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -2,7 +2,7 @@ - build-backend = "mesonpy" - requires = [ - "Cython>=0.29.34,<3.1", -- "meson-python>=0.15.0,<0.16.0", -+ "meson-python>=0.15.0", - ] - - [project] diff --git a/srcpkgs/python3-numpy/template b/srcpkgs/python3-numpy/template index e6b6accb42a..cab4e3e506d 100644 --- a/srcpkgs/python3-numpy/template +++ b/srcpkgs/python3-numpy/template @@ -1,6 +1,6 @@ # Template file for 'python3-numpy' pkgname=python3-numpy -version=1.26.4 +version=2.0.1 revision=1 build_style=python3-pep517 build_helper="meson qemu" @@ -19,7 +19,7 @@ license="BSD-3-Clause" homepage="https://www.numpy.org/" changelog="https://github.com/numpy/numpy/releases" distfiles="${PYPI_SITE}/n/numpy/numpy-${version}.tar.gz" -checksum=2a02aba9ed12e4ac4eb3ea9421c420301a0c6460d9830d74a9df87efa4912010 +checksum=485b87235796410c3519a699cfe1faab097e509e90ebb05dcd098db2ae87e7b3 alternatives="numpy:f2py:/usr/bin/f2py3" build_options="openblas" @@ -42,14 +42,10 @@ fi post_patch() { case "${XBPS_TARGET_MACHINE}" in armv5tel-musl) - cp "${FILESDIR}/fenv-constants.h" numpy/core/src/npymath/ + cp "${FILESDIR}/fenv-constants.h" numpy/_core/src/npymath/ patch -Np0 -i "${FILESDIR}/fenv-constants.patch" ;; esac - - if [ "$XBPS_TARGET_LIBC" = musl ] ; then - vsed -i 's|"backtrace",||' numpy/core/setup_common.py - fi } do_check() { @@ -77,9 +73,17 @@ do_check() { local testdir="${wrksrc}/.xbps-testdir/$(date +%s)" python3 -m installer --destdir "${testdir}" dist/numpy*.whl + cd "${testdir}" PATH="${testdir}/usr/bin:${PATH}" PYTHONPATH="${testdir}/${py3_sitelib}" \ - python3 runtests.py --no-build -- \ - -n "${XBPS_MAKEJOBS}" ${_skip+-k "not(${_skip#or})"} + python3 <<-EOF + import numpy + numpy.test( + extra_argv=[ + '-n', '${XBPS_MAKEJOBS}', + ${_skip+'-k', 'not(${_skip#or})'} + ], + ) + EOF } post_install() {