Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] python3-numpy: update to 1.25.0.
Date: Mon, 26 Jun 2023 04:47:26 +0200	[thread overview]
Message-ID: <20230626024726.T-rZW81wsmzwYUVrKWUadzUyd0PhQwooXM-QN9uMvMI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-44529@inbox.vuxu.org>

[-- 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
 

  parent reply	other threads:[~2023-06-26  2:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  2:34 [PR PATCH] " 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 ` tornaria [this message]
2023-06-26  3:19 ` [PR PATCH] [Updated] " tornaria
2023-06-26 16:04 ` [PR PATCH] [Merged]: " ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230626024726.T-rZW81wsmzwYUVrKWUadzUyd0PhQwooXM-QN9uMvMI@z \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).