public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/numpy/, dev-python/numpy/files/
Date: Tue,  7 Nov 2023 20:35:03 +0000 (UTC)	[thread overview]
Message-ID: <1699389237.4371dc93a2cc3cc988f908a41780381ea087d7cc.sam@gentoo> (raw)

commit:     4371dc93a2cc3cc988f908a41780381ea087d7cc
Author:     Matoro Mahri <matoro_gentoo <AT> matoro <DOT> tk>
AuthorDate: Mon Nov  6 18:25:31 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  7 20:33:57 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4371dc93

dev-python/numpy: fix alpha issues

One test that imports numpy from system namespace, disable this test
unless the current version of numpy is already installed.

One test that needs source code patch, submitted upstream.

See: https://github.com/numpy/numpy/pull/25078
Bug: https://bugs.gentoo.org/909738
Signed-off-by: Matoro Mahri <matoro_gentoo <AT> matoro.tk>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-python/numpy/files/numpy-1.26.1-alpha.patch | 25 +++++++++++++++++++++++++
 dev-python/numpy/numpy-1.26.1.ebuild            |  8 ++++++++
 2 files changed, 33 insertions(+)

diff --git a/dev-python/numpy/files/numpy-1.26.1-alpha.patch b/dev-python/numpy/files/numpy-1.26.1-alpha.patch
new file mode 100644
index 000000000000..a0b2ca2eda91
--- /dev/null
+++ b/dev-python/numpy/files/numpy-1.26.1-alpha.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/909738
+https://github.com/numpy/numpy/pull/25078
+
+commit 43aaf2093d8dfb3c1fea5d409ea4aa1d0f77816f
+Author: matoro <matoro@users.noreply.github.com>
+Date:   Mon Nov 6 10:21:32 2023 -0500
+
+    BUG: alpha doesn't use REAL(10)
+    
+    Same as e.g. loongarch per gh-24904.  At this point seems like it should
+    be more of an exclude list than an include one...
+
+diff --git a/numpy/f2py/crackfortran.py b/numpy/f2py/crackfortran.py
+index f352bbaa2..d17b052f9 100755
+--- a/numpy/f2py/crackfortran.py
++++ b/numpy/f2py/crackfortran.py
+@@ -2452,7 +2452,7 @@ def _selected_real_kind_func(p, r=0, radix=0):
+     if p < 16:
+         return 8
+     machine = platform.machine().lower()
+-    if machine.startswith(('aarch64', 'arm64', 'loongarch', 'power', 'ppc', 'riscv', 's390x', 'sparc')):
++    if machine.startswith(('aarch64', 'alpha', 'arm64', 'loongarch', 'power', 'ppc', 'riscv', 's390x', 'sparc')):
+         if p <= 33:
+             return 16
+     else:

diff --git a/dev-python/numpy/numpy-1.26.1.ebuild b/dev-python/numpy/numpy-1.26.1.ebuild
index 955652eea0d8..03c05aeaa686 100644
--- a/dev-python/numpy/numpy-1.26.1.ebuild
+++ b/dev-python/numpy/numpy-1.26.1.ebuild
@@ -49,6 +49,7 @@ BDEPEND="
 		>=dev-python/pytz-2019.3[${PYTHON_USEDEP}]
 	)
 "
+PATCHES=( "${FILESDIR}/${PN}-1.26.1-alpha.patch" )
 
 EPYTEST_XDIST=1
 distutils_enable_tests pytest
@@ -142,6 +143,13 @@ python_test() {
 			;;
 	esac
 
+	if ! has_version -b "~${CATEGORY}/${P}[${PYTHON_USEDEP}]" ; then
+		# depends on importing numpy.random from system namespace
+		EPYTEST_DESELECT+=(
+			'random/tests/test_extending.py::test_cython'
+		)
+	fi
+
 	rm -rf numpy || die
 	epytest --pyargs numpy
 }


             reply	other threads:[~2023-11-07 20:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07 20:35 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-10-31 19:19 [gentoo-commits] repo/gentoo:master commit in: dev-python/numpy/, dev-python/numpy/files/ Michał Górny
2024-07-22  1:20 Michał Górny
2023-08-22  4:12 Michał Górny
2023-08-01  6:48 Sam James
2023-07-23 21:43 Sam James
2023-06-26 13:14 Sam James
2022-12-03 17:01 Michał Górny
2022-10-25  8:21 Sam James
2022-10-08 13:52 Michał Górny
2021-12-31 22:49 Sam James
2021-09-08  6:16 Michał Górny
2021-05-24 22:09 Sam James
2021-05-14 21:39 Marek Szuba
2021-04-30 20:25 Michał Górny
2021-03-28  9:48 Michał Górny
2020-09-16 10:13 Michał Górny
2020-02-26 19:46 David Seifert
2019-11-20  1:24 Patrick McLean
2019-06-23 12:47 Benda XU
2019-01-08 18:54 Virgil Dupras
2018-07-15 22:22 Michał Górny
2018-07-14 21:44 Michał Górny
2016-10-18 20:02 David Seifert

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=1699389237.4371dc93a2cc3cc988f908a41780381ea087d7cc.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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