From feb2152ec5089cc13e7b2fd6ad60d79c0797d476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 19 Jun 2023 23:21:53 -0300 Subject: [PATCH] python3-numpy: update to 1.25.0. --- .../patches/fix-pytest-warning.patch | 8 +++++ srcpkgs/python3-numpy/template | 30 +++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/python3-numpy/patches/fix-pytest-warning.patch diff --git a/srcpkgs/python3-numpy/patches/fix-pytest-warning.patch b/srcpkgs/python3-numpy/patches/fix-pytest-warning.patch new file mode 100644 index 000000000000..990ab8019754 --- /dev/null +++ b/srcpkgs/python3-numpy/patches/fix-pytest-warning.patch @@ -0,0 +1,8 @@ +--- 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/template b/srcpkgs/python3-numpy/template index 30e5ca3a3e58..674ce94e1a26 100644 --- a/srcpkgs/python3-numpy/template +++ b/srcpkgs/python3-numpy/template @@ -1,21 +1,21 @@ # Template file for 'python3-numpy' pkgname=python3-numpy -version=1.24.3 +version=1.25.0 revision=1 build_style=python3-module hostmakedepends="python3-setuptools python3-Cython gcc-fortran" makedepends="python3-devel $(vopt_if openblas 'openblas-devel' 'lapack-devel cblas-devel')" depends="python3-setuptools" +checkdepends="python3-pytest-xdist python3-hypothesis python3-pytz" short_desc="Fast and sophisticated array facility to Python3" maintainer="Andrew J. Hesford " license="BSD-3-Clause" homepage="https://www.numpy.org/" -distfiles="https://github.com/numpy/numpy/archive/v${version}.tar.gz" -checksum=0d78333b35bd704826892a56e2af71af69139ee02fa155c8c83aeec58bee4744 +changelog="https://numpy.org/doc/stable/release.html" +distfiles="${PYPI_SITE}/n/numpy/numpy-${version}.tar.gz" +checksum=f1accae9a28dc3cda46a91de86acf69de0d1b5f4edd44a9b0c3ceb8036dfff19 alternatives="numpy:f2py:/usr/bin/f2py3" -# Tests do not function propery in a build directory -make_check="no" build_options="openblas" @@ -67,6 +67,26 @@ pre_build() { done } +do_check() { + local testjobs="-n $XBPS_MAKEJOBS" + local _skip + + case $XBPS_TARGET_MACHINE in + # this triggers a known bug in musl libm, fixed in: + # https://git.musl-libc.org/cgit/musl/commit/?id=aa2d23e57c9c95f0ffeb80cb035e5a5be52d8ef0 + *-musl) _skip+="or(test_against_cmath)" ;; + esac + + if [ ${XBPS_TARGET_MACHINE%-musl} = "i686" ]; then + # see: https://github.com/numpy/numpy/issues/18388 + _skip+="or(test_float_remainder_overflow)" + _skip+="or(test_identityless_reduction_huge_array)" + _skip+="or((TestKind)and(test_int))" + fi + + echo python3 runtests.py -- ${testjobs} ${_skip+-k "not(${_skip#or})"} +} + post_install() { rm ${DESTDIR}/usr/bin/f2py