commit:     b9d3050d6c136f92f14f193310b57622dbb4c045
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu May 11 05:52:14 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu May 11 06:22:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9d3050d

dev-python/h5py: Backport cython-3 fix

Closes: https://bugs.gentoo.org/898672
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/h5py/files/h5py-3.8.0-cython3.patch | 26 ++++++++++++++++++++++++++
 dev-python/h5py/h5py-3.8.0.ebuild              |  4 ++++
 2 files changed, 30 insertions(+)

diff --git a/dev-python/h5py/files/h5py-3.8.0-cython3.patch 
b/dev-python/h5py/files/h5py-3.8.0-cython3.patch
new file mode 100644
index 000000000000..3201a2ea0e6b
--- /dev/null
+++ b/dev-python/h5py/files/h5py-3.8.0-cython3.patch
@@ -0,0 +1,26 @@
+From af48a740070643549e76890fcc88276fe4ee1159 Mon Sep 17 00:00:00 2001
+From: Thomas A Caswell <[email protected]>
+Date: Mon, 3 Apr 2023 14:55:18 -0400
+Subject: [PATCH] BLD: fix for cython3 compatibility
+
+---
+ h5py/_errors.pyx | 2 +-
+ pyproject.toml   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/h5py/_errors.pyx b/h5py/_errors.pyx
+index ca7b1c48..c3bd184e 100644
+--- a/h5py/_errors.pyx
++++ b/h5py/_errors.pyx
+@@ -94,7 +94,7 @@ cdef struct err_data_t:
+     H5E_error_t err
+     int n
+ 
+-cdef herr_t walk_cb(unsigned int n, const H5E_error_t *desc, void *e) nogil:
++cdef herr_t walk_cb(unsigned int n, const H5E_error_t *desc, void *e) nogil 
noexcept:
+ 
+     cdef err_data_t *ee = <err_data_t*>e
+ 
+-- 
+2.40.1
+

diff --git a/dev-python/h5py/h5py-3.8.0.ebuild 
b/dev-python/h5py/h5py-3.8.0.ebuild
index 2d868534ddc3..5b3499eae04f 100644
--- a/dev-python/h5py/h5py-3.8.0.ebuild
+++ b/dev-python/h5py/h5py-3.8.0.ebuild
@@ -52,6 +52,10 @@ distutils_enable_sphinx docs \
 #}
 
 python_prepare_all() {
+       local PATCHES=(
+               "${FILESDIR}/${P}-cython3.patch"
+       )
+
        # avoid pytest-mpi dep, we do not use mpi anyway
        sed -i -e 's:pytest-mpi::' pytest.ini || die
        distutils-r1_python_prepare_all

Reply via email to