* [PR PATCH] python3-numpy: update to 1.25.0.
@ 2023-06-20 2:34 tornaria
2023-06-20 2:39 ` [PR REVIEW] " ahesford
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: tornaria @ 2023-06-20 2:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1624 bytes --]
There is a new pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages numpy
https://github.com/void-linux/void-packages/pull/44529
python3-numpy: update to 1.25.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
I enabled check, and I'm currently testing with sagemath to see what fails and fix it. So far I've only tried x86_64.
I didn't change the build-style to pep517 because that won't allow parallel build. For testing, a custom `do_check()` is needed in any case. Moreover, it seems numpy will soon move to meson for building so we may as well wait for that.
@ahesford
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/44529.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-numpy-44529.patch --]
[-- Type: text/x-diff, Size: 2608 bytes --]
From c6b1aab112a8f8fb872591e291d219955bacd769 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
Date: Mon, 19 Jun 2023 23:21:53 -0300
Subject: [PATCH] python3-numpy: update to 1.25.0.
---
.../python3-numpy/patches/fix-pytest-warning.patch | 8 ++++++++
srcpkgs/python3-numpy/template | 14 +++++++++-----
2 files changed, 17 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..9f934dde751e 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 <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://github.com/numpy/numpy/releases"
+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,10 @@ pre_build() {
done
}
+do_check() {
+ python3 runtests.py -- -n${XBPS_MAKEJOBS}
+}
+
post_install() {
rm ${DESTDIR}/usr/bin/f2py
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR REVIEW] python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
@ 2023-06-20 2:39 ` ahesford
2023-06-20 2:40 ` tornaria
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ahesford @ 2023-06-20 2:39 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 222 bytes --]
New review comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/44529#discussion_r1234671780
Comment:
```suggestion
changelog="https://numpy.org/doc/stable/release.html"
```
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
2023-06-20 2:39 ` [PR REVIEW] " ahesford
@ 2023-06-20 2:40 ` tornaria
2023-06-20 3:02 ` tornaria
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-20 2:40 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/44529#issuecomment-1598031775
Comment:
```
$ sage -tp 8 --all
[...]
----------------------------------------------------------------------
sage -t --warn-long 4.0 --random-seed=305131057254283109728703750079119927823 /usr/lib/python3.11/site-packages/sage/plot/plot3d/plot3d.py # 1 doctest failed
sage -t --warn-long 4.0 --random-seed=305131057254283109728703750079119927823 /usr/lib/python3.11/site-packages/sage/matrix/matrix2.pyx # 1 doctest failed
sage -t --warn-long 4.0 --random-seed=305131057254283109728703750079119927823 /usr/lib/python3.11/site-packages/sage/calculus/desolvers.py # 2 doctests failed
sage -t --warn-long 4.0 --random-seed=305131057254283109728703750079119927823 /usr/lib/python3.11/site-packages/sage/stats/distributions/discrete_gaussian_lattice.py # 1 doctest failed
sage -t --warn-long 4.0 --random-seed=305131057254283109728703750079119927823 /usr/lib/python3.11/site-packages/sage/plot/plot3d/list_plot3d.py # 5 doctests failed
sage -t --warn-long 4.0 --random-seed=305131057254283109728703750079119927823 /usr/lib/python3.11/site-packages/sage/matrix/matrix_numpy_dense.pyx # 1 doctest failed
----------------------------------------------------------------------
```
I'll try to fix those, nothing seems too bad. Ideally we would wait until sagemath is fixed to push the numpy update.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
2023-06-20 2:39 ` [PR REVIEW] " ahesford
2023-06-20 2:40 ` tornaria
@ 2023-06-20 3:02 ` tornaria
2023-06-20 20:46 ` tornaria
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-20 3:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 218 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/44529#issuecomment-1598043575
Comment:
i686 and musl failed, I will work on them locally before I resubmit the PR.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (2 preceding siblings ...)
2023-06-20 3:02 ` tornaria
@ 2023-06-20 20:46 ` tornaria
2023-06-20 21:18 ` tornaria
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-20 20:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 3539 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/44529#issuecomment-1599471459
Comment:
musl is this single failure:
```
2023-06-20T02:42:42.2859874Z ___________________ TestComplexFunctions.test_against_cmath ____________________
2023-06-20T02:42:42.2860557Z [gw1] linux -- Python 3.11.4 /usr/bin/python3
2023-06-20T02:42:42.2919785Z
2023-06-20T02:42:42.2922623Z self = <numpy.core.tests.test_umath.TestComplexFunctions object at 0x7f525a4471d0>
2023-06-20T02:42:42.2925068Z
2023-06-20T02:42:42.2927330Z def test_against_cmath(self):
2023-06-20T02:42:42.2929736Z import cmath
2023-06-20T02:42:42.2932080Z
2023-06-20T02:42:42.2934650Z points = [-1-1j, -1+1j, +1-1j, +1+1j]
2023-06-20T02:42:42.2937220Z name_map = {'arcsin': 'asin', 'arccos': 'acos', 'arctan': 'atan',
2023-06-20T02:42:42.2940138Z 'arcsinh': 'asinh', 'arccosh': 'acosh', 'arctanh': 'atanh'}
2023-06-20T02:42:42.2942626Z atol = 4*np.finfo(complex).eps
2023-06-20T02:42:42.2945045Z for func in self.funcs:
2023-06-20T02:42:42.2947527Z fname = func.__name__.split('.')[-1]
2023-06-20T02:42:42.2950099Z cname = name_map.get(fname, fname)
2023-06-20T02:42:42.2952604Z try:
2023-06-20T02:42:42.2954975Z cfunc = getattr(cmath, cname)
2023-06-20T02:42:42.2957354Z except AttributeError:
2023-06-20T02:42:42.2959699Z continue
2023-06-20T02:42:42.2962246Z for p in points:
2023-06-20T02:42:42.2964704Z a = complex(func(np.complex_(p)))
2023-06-20T02:42:42.2967207Z b = cfunc(p)
2023-06-20T02:42:42.2969730Z > assert_(abs(a - b) < atol, "%s %s: %s; cmath: %s" % (fname, p, a, b))
2023-06-20T02:42:42.2972367Z E AssertionError: arccosh (-1-1j): (-1.0612750619050357+2.2370357592874117j); cmath: (1.0612750619050357-2.237035759287412j)
2023-06-20T02:42:42.2974705Z
2023-06-20T02:42:42.2976981Z a = (-1.0612750619050357+2.2370357592874117j)
2023-06-20T02:42:42.2979401Z atol = 8.881784197001252e-16
2023-06-20T02:42:42.2981835Z b = (1.0612750619050357-2.237035759287412j)
2023-06-20T02:42:42.2984234Z cfunc = <built-in function acosh>
2023-06-20T02:42:42.2986844Z cmath = <module 'cmath' from '/usr/lib/python3.11/lib-dynload/cmath.cpython-311-x86_64-linux-musl.so'>
2023-06-20T02:42:42.2989329Z cname = 'acosh'
2023-06-20T02:42:42.2991685Z fname = 'arccosh'
2023-06-20T02:42:42.2992415Z func = <ufunc 'arccosh'>
2023-06-20T02:42:42.2993001Z name_map = {'arccos': 'acos', 'arccosh': 'acosh', 'arcsin': 'asin', 'arcsinh': 'asinh', ...}
2023-06-20T02:42:42.2993512Z p = (-1-1j)
2023-06-20T02:42:42.2993981Z points = [(-1-1j), (-1+1j), (1-1j), (1+1j)]
2023-06-20T02:42:42.2994496Z self = <numpy.core.tests.test_umath.TestComplexFunctions object at 0x7f525a4471d0>
2023-06-20T02:42:42.2994903Z
2023-06-20T02:42:42.2995196Z numpy/core/tests/test_umath.py:4161: AssertionError
```
Can reproduce with:
```
$ python -c 'import cmath, numpy; print(cmath.acosh(-1-1j),numpy.arccosh(-1-1j))'
(1.0612750619050357-2.237035759287412j) (-1.0612750619050357+2.2370357592874117j)
```
Indeed this is "incorrect" since it should choose a branch with positive real part (i.e `cmath` output is ok, `numpy` output is incorrect).
Note this is also wrong in the 1.24.3 that is in void repo (but only on musl).
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (3 preceding siblings ...)
2023-06-20 20:46 ` tornaria
@ 2023-06-20 21:18 ` tornaria
2023-06-20 21:24 ` tornaria
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-20 21:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 952 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/44529#issuecomment-1599570276
Comment:
Actually, this seems like a bug in musl libm:
```
$ cat cacosh.c
#include <complex.h>
#include <stdio.h>
void main()
{
double complex z = -1 -I, c;
c = cacosh(z);
printf("cacosh(z) = %6.3f %6.3f*i\n", creal(c), cimag(c));
}
$ cc cacosh.c -o cacosh -lm && ./cacosh
cacosh(z) = -1.061 2.237*i
```
Note that `cacosh(3p)` says:
```
RETURN VALUE
These functions shall return the complex arc hyperbolic cosine value,
in the range of a half-strip of non-negative values along the real axis
and in the interval [-iπ, +iπ] along the imaginary axis.
```
For whatever reason `cmath.acosh` is not catching this error (probably because it's not using C99 complex trig functions but reimplementing them from C89 real functions).
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (4 preceding siblings ...)
2023-06-20 21:18 ` tornaria
@ 2023-06-20 21:24 ` tornaria
2023-06-21 2:46 ` ahesford
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-20 21:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 351 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/44529#issuecomment-1599580917
Comment:
See here: https://git.musl-libc.org/cgit/musl/commit/?id=aa2d23e57c9c95f0ffeb80cb035e5a5be52d8ef0
I didn't try it but it seems like that would do the trick; I'm guessing our musl is older than this commit.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (5 preceding siblings ...)
2023-06-20 21:24 ` tornaria
@ 2023-06-21 2:46 ` ahesford
2023-06-22 21:13 ` [PR PATCH] [Updated] " tornaria
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ahesford @ 2023-06-21 2:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 205 bytes --]
New comment by ahesford on void-packages repository
https://github.com/void-linux/void-packages/pull/44529#issuecomment-1599990032
Comment:
Don't worry about this failure; we can just ignore it for now.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Updated] python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (6 preceding siblings ...)
2023-06-21 2:46 ` ahesford
@ 2023-06-22 21:13 ` tornaria
2023-06-22 21:22 ` tornaria
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-22 21:13 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages numpy
https://github.com/void-linux/void-packages/pull/44529
python3-numpy: update to 1.25.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
I enabled check, and I'm currently testing with sagemath to see what fails and fix it. So far I've only tried x86_64.
I didn't change the build-style to pep517 because that won't allow parallel build. For testing, a custom `do_check()` is needed in any case. Moreover, it seems numpy will soon move to meson for building so we may as well wait for that.
@ahesford
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/44529.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-numpy-44529.patch --]
[-- Type: text/x-diff, Size: 3173 bytes --]
From feb2152ec5089cc13e7b2fd6ad60d79c0797d476 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
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 <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"
@@ -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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (7 preceding siblings ...)
2023-06-22 21:13 ` [PR PATCH] [Updated] " tornaria
@ 2023-06-22 21:22 ` tornaria
2023-06-25 0:04 ` tornaria
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-22 21:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/44529#issuecomment-1603334373
Comment:
I have worked out the issues with sage; I will soon make a PR for an updated sagemath 10.0 patched with support for maxima 5.47.0, singular 4.3.2p2 and numpy 1.25.0 (which are the 3 updates that break it slightly).
Ideally this PR should wait until sagemath is patched.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (8 preceding siblings ...)
2023-06-22 21:22 ` tornaria
@ 2023-06-25 0:04 ` tornaria
2023-06-26 2:47 ` [PR PATCH] [Updated] " tornaria
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-25 0:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 175 bytes --]
New comment by tornaria on void-packages repository
https://github.com/void-linux/void-packages/pull/44529#issuecomment-1605783149
Comment:
This can be merged after #44624.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Updated] python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (9 preceding siblings ...)
2023-06-25 0:04 ` tornaria
@ 2023-06-26 2:47 ` tornaria
2023-06-26 3:19 ` tornaria
2023-06-26 16:04 ` [PR PATCH] [Merged]: " ahesford
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-26 2:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages numpy
https://github.com/void-linux/void-packages/pull/44529
python3-numpy: update to 1.25.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
I enabled check, and I'm currently testing with sagemath to see what fails and fix it. So far I've only tried x86_64.
I didn't change the build-style to pep517 because that won't allow parallel build. For testing, a custom `do_check()` is needed in any case. Moreover, it seems numpy will soon move to meson for building so we may as well wait for that.
@ahesford
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/44529.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-numpy-44529.patch --]
[-- Type: text/x-diff, Size: 3241 bytes --]
From 39453c2c43eafda217059f7af26f6dc1ff1e1889 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
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 | 31 ++++++++++++++++---
2 files changed, 34 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..a6350b53ebcb 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 <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"
@@ -67,6 +67,27 @@ 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})"}
+ python3 runtests.py -- ${testjobs} ${_skip+-k "not(${_skip#or})"}
+}
+
post_install() {
rm ${DESTDIR}/usr/bin/f2py
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Updated] python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (10 preceding siblings ...)
2023-06-26 2:47 ` [PR PATCH] [Updated] " tornaria
@ 2023-06-26 3:19 ` tornaria
2023-06-26 16:04 ` [PR PATCH] [Merged]: " ahesford
12 siblings, 0 replies; 14+ messages in thread
From: tornaria @ 2023-06-26 3:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]
There is an updated pull request by tornaria against master on the void-packages repository
https://github.com/tornaria/void-packages numpy
https://github.com/void-linux/void-packages/pull/44529
python3-numpy: update to 1.25.0.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
I enabled check, and I'm currently testing with sagemath to see what fails and fix it. So far I've only tried x86_64.
I didn't change the build-style to pep517 because that won't allow parallel build. For testing, a custom `do_check()` is needed in any case. Moreover, it seems numpy will soon move to meson for building so we may as well wait for that.
@ahesford
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/44529.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-numpy-44529.patch --]
[-- Type: text/x-diff, Size: 3397 bytes --]
From 71723735c0de98ace94e512e95de8f745ec1aaf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= <tornaria@cmat.edu.uy>
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 | 35 ++++++++++++++++---
2 files changed, 38 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..a0a479ac89da 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 <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"
@@ -67,6 +67,31 @@ 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))"
+ # these 3 fail in CI but not locally
+ _skip+="or(test_einsum_sums_int8)"
+ _skip+="or(test_einsum_sums_uint8)"
+ _skip+="or(test_einsum_sums_int16)"
+ fi
+
+ echo python3 runtests.py -- ${testjobs} ${_skip+-k "not(${_skip#or})"}
+ python3 runtests.py -- ${testjobs} ${_skip+-k "not(${_skip#or})"}
+}
+
post_install() {
rm ${DESTDIR}/usr/bin/f2py
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PR PATCH] [Merged]: python3-numpy: update to 1.25.0.
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
` (11 preceding siblings ...)
2023-06-26 3:19 ` tornaria
@ 2023-06-26 16:04 ` ahesford
12 siblings, 0 replies; 14+ messages in thread
From: ahesford @ 2023-06-26 16:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]
There's a merged pull request on the void-packages repository
python3-numpy: update to 1.25.0.
https://github.com/void-linux/void-packages/pull/44529
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
I enabled check, and I'm currently testing with sagemath to see what fails and fix it. So far I've only tried x86_64.
I didn't change the build-style to pep517 because that won't allow parallel build. For testing, a custom `do_check()` is needed in any case. Moreover, it seems numpy will soon move to meson for building so we may as well wait for that.
@ahesford
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-06-26 16:04 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20 2:34 [PR PATCH] python3-numpy: update to 1.25.0 tornaria
2023-06-20 2:39 ` [PR REVIEW] " ahesford
2023-06-20 2:40 ` tornaria
2023-06-20 3:02 ` tornaria
2023-06-20 20:46 ` tornaria
2023-06-20 21:18 ` tornaria
2023-06-20 21:24 ` tornaria
2023-06-21 2:46 ` ahesford
2023-06-22 21:13 ` [PR PATCH] [Updated] " tornaria
2023-06-22 21:22 ` tornaria
2023-06-25 0:04 ` tornaria
2023-06-26 2:47 ` [PR PATCH] [Updated] " tornaria
2023-06-26 3:19 ` tornaria
2023-06-26 16:04 ` [PR PATCH] [Merged]: " ahesford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).