Skip to content

Commit

Permalink
python3-numpy: update to 1.25.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
tornaria committed Jun 22, 2023
1 parent 8967837 commit feb2152
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
8 changes: 8 additions & 0 deletions srcpkgs/python3-numpy/patches/fix-pytest-warning.patch
Original file line number Diff line number Diff line change
@@ -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
30 changes: 25 additions & 5 deletions srcpkgs/python3-numpy/template
Original file line number Diff line number Diff line change
@@ -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 <ajh@sideband.org>"
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"

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit feb2152

Please sign in to comment.