pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/py-h5py
Module Name: pkgsrc
Committed By: wiz
Date: Wed Dec 13 20:29:09 UTC 2023
Modified Files:
pkgsrc/devel/py-h5py: Makefile PLIST distinfo
Added Files:
pkgsrc/devel/py-h5py/patches: patch-h5py___errors.pxd
patch-h5py___errors.pyx patch-h5py___locks.pxi
patch-h5py___proxy.pyx patch-h5py_api__compat.h
patch-h5py_api__types__hdf5.pxd patch-h5py_h5fd.pyx
patch-h5py_tests_test__dataset.py patch-pyproject.toml
Log Message:
py-h5py: update to 3.10.0.
pkgsrc change: Use post-release upstream code to fix build with Cython 3.
What's new in h5py 3.10
=======================
New features
------------
* h5py now has pre-built packages for Python 3.12.
* Pre-built packages on Linux & Windows now bundle HDF5 version 1.14.2.
Mac packages still contain HDF5 1.12.2 for now. You can still :ref:`build h5py
from source <source_install>` against a wider range of HDF5 versions.
* The read-only S3 file driver ('ros3') now accepts an AWS session token
as part of the credentials (:pr:`2301`). Pass ``session_token`` when opening
a :class:`.File` (along with the other S3 parameters). This requires HDF5
1.14.2 or later, with the ROS3 feature built.
Deprecations & removals
-----------------------
* Support for the HDF5 1.8 series was dropped, along with early 1.10 releases.
The minimum required HDF5 version is now 1.10.4.
Exposing HDF5 functions
-----------------------
* ``H5Pget_fapl_ros3_token`` & ``H5Pset_fapl_ros3_token``
Bug fixes
---------
* Various nasty bugs when using nested compound and vlen data types have been
fixed (:pr:`2134`).
* Fixed an ``OverflowError`` in some cases when registering a filter with
:func:`h5z.register_filter`, especially on 32-bit architectures (:pr:`2318`).
* Sequential slicing/indexing operations on a :class:`.VirtualSource` object
(e.g. ``source[:10][::2]``) now raise an error, rather than giving incorrect
results (:pr:`2280`).
Building h5py
-------------
* h5py now uses HDF5's 1.10 compatibility mode at compile time rather than the
1.8 compatibility mode (:pr:`2320`). This is normally transparent even if you're
building h5py from source.
To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 pkgsrc/devel/py-h5py/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/devel/py-h5py/PLIST
cvs rdiff -u -r1.11 -r1.12 pkgsrc/devel/py-h5py/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/py-h5py/patches/patch-h5py___errors.pxd \
pkgsrc/devel/py-h5py/patches/patch-h5py___errors.pyx \
pkgsrc/devel/py-h5py/patches/patch-h5py___locks.pxi \
pkgsrc/devel/py-h5py/patches/patch-h5py___proxy.pyx \
pkgsrc/devel/py-h5py/patches/patch-h5py_api__compat.h \
pkgsrc/devel/py-h5py/patches/patch-h5py_api__types__hdf5.pxd \
pkgsrc/devel/py-h5py/patches/patch-h5py_h5fd.pyx \
pkgsrc/devel/py-h5py/patches/patch-h5py_tests_test__dataset.py \
pkgsrc/devel/py-h5py/patches/patch-pyproject.toml
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/py-h5py/Makefile
diff -u pkgsrc/devel/py-h5py/Makefile:1.17 pkgsrc/devel/py-h5py/Makefile:1.18
--- pkgsrc/devel/py-h5py/Makefile:1.17 Thu Aug 31 11:58:40 2023
+++ pkgsrc/devel/py-h5py/Makefile Wed Dec 13 20:29:09 2023
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.17 2023/08/31 11:58:40 adam Exp $
+# $NetBSD: Makefile,v 1.18 2023/12/13 20:29:09 wiz Exp $
-DISTNAME= h5py-3.9.0
+DISTNAME= h5py-3.10.0
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=h/h5py/}
@@ -10,13 +10,18 @@ HOMEPAGE= https://www.h5py.org/
COMMENT= Python interface to the HDF5 library
LICENSE= modified-bsd
+TOOL_DEPENDS+= ${PYPKGPREFIX}-cython-[0-9]*:../../devel/py-cython
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
+TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
+#TEST_DEPENDS+= py-test-mpi
+
MAKE_ENV= HDF5_DIR=${PREFIX}
PYTHON_VERSIONS_INCOMPATIBLE= 27 38
-BUILDLINK_API_DEPENDS.hdf5+= hdf5>=1.10
+BUILDLINK_API_DEPENDS.hdf5+= hdf5>=1.10.4
.include "../../devel/hdf5/buildlink3.mk"
.include "../../devel/py-cython/buildlink3.mk"
-.include "../../lang/python/egg.mk"
+.include "../../lang/python/wheel.mk"
.include "../../math/py-numpy/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/py-h5py/PLIST
diff -u pkgsrc/devel/py-h5py/PLIST:1.8 pkgsrc/devel/py-h5py/PLIST:1.9
--- pkgsrc/devel/py-h5py/PLIST:1.8 Thu Aug 31 11:58:40 2023
+++ pkgsrc/devel/py-h5py/PLIST Wed Dec 13 20:29:09 2023
@@ -1,9 +1,9 @@
-@comment $NetBSD: PLIST,v 1.8 2023/08/31 11:58:40 adam Exp $
-${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
-${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
-${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
-${PYSITELIB}/${EGG_INFODIR}/requires.txt
-${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+@comment $NetBSD: PLIST,v 1.9 2023/12/13 20:29:09 wiz Exp $
+${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
${PYSITELIB}/h5py/__init__.py
${PYSITELIB}/h5py/__init__.pyc
${PYSITELIB}/h5py/__init__.pyo
Index: pkgsrc/devel/py-h5py/distinfo
diff -u pkgsrc/devel/py-h5py/distinfo:1.11 pkgsrc/devel/py-h5py/distinfo:1.12
--- pkgsrc/devel/py-h5py/distinfo:1.11 Thu Aug 31 11:58:40 2023
+++ pkgsrc/devel/py-h5py/distinfo Wed Dec 13 20:29:09 2023
@@ -1,5 +1,14 @@
-$NetBSD: distinfo,v 1.11 2023/08/31 11:58:40 adam Exp $
+$NetBSD: distinfo,v 1.12 2023/12/13 20:29:09 wiz Exp $
-BLAKE2s (h5py-3.9.0.tar.gz) = 32e67c2ac8c5c4d97abb295d8d1e8653d4f1cfbfd7e08d79af44a455124c8a3c
-SHA512 (h5py-3.9.0.tar.gz) = f87cb36ba874e86b179776031c3345ad83bc7b5eff2f3ee54acb6b0997cc7925c17dc478957103ab6bb07d8aaa8593af1d51c3547021a205e9d01c0e36d833a9
-Size (h5py-3.9.0.tar.gz) = 402856 bytes
+BLAKE2s (h5py-3.10.0.tar.gz) = 42c235c96ecd36a218f468ae07fdd1aeecd2a613a44cc8038e0b8227b2e90202
+SHA512 (h5py-3.10.0.tar.gz) = 840d7f2b9b9d5e22e8edae21c84884abec64acdd6c36437a4921ce9dc1b343c55f66f72b699146d71fe55688f6f948787b62335a24906288e9565b2b19b24b01
+Size (h5py-3.10.0.tar.gz) = 403716 bytes
+SHA1 (patch-h5py___errors.pxd) = 8b180360c0e594e74fe856af34e2586b9f6c30ee
+SHA1 (patch-h5py___errors.pyx) = 2c85ae5247458e7239c62d6c5673f9382a5364f6
+SHA1 (patch-h5py___locks.pxi) = 6d85f0081e05e2159fa1110a0ad2e29a899e3fc9
+SHA1 (patch-h5py___proxy.pyx) = 78ddd6984ad9007464c5705cff53b870d9a9d2b8
+SHA1 (patch-h5py_api__compat.h) = 6821a1fb845a5613959b7958bf1748c37fb44e94
+SHA1 (patch-h5py_api__types__hdf5.pxd) = c10621fad075e4bd0e392ca702950186b55fb255
+SHA1 (patch-h5py_h5fd.pyx) = 518132ff0258595bb49725c46145a59ad3429f40
+SHA1 (patch-h5py_tests_test__dataset.py) = de44c0e74ce9b53aa060be0dfacc39162f335698
+SHA1 (patch-pyproject.toml) = ad08e90ed3f8b642978df15d130c6a3e81f3fa9c
Added files:
Index: pkgsrc/devel/py-h5py/patches/patch-h5py___errors.pxd
diff -u /dev/null pkgsrc/devel/py-h5py/patches/patch-h5py___errors.pxd:1.1
--- /dev/null Wed Dec 13 20:29:09 2023
+++ pkgsrc/devel/py-h5py/patches/patch-h5py___errors.pxd Wed Dec 13 20:29:09 2023
@@ -0,0 +1,13 @@
+$NetBSD: patch-h5py___errors.pxd,v 1.1 2023/12/13 20:29:09 wiz Exp $
+
+Fix build with Cython 3.
+https://github.com/h5py/h5py/pull/2345
+
+--- h5py/_errors.pxd.orig 2023-10-04 09:21:14.000000000 +0000
++++ h5py/_errors.pxd
+@@ -425,4 +425,4 @@ ctypedef struct err_cookie:
+ cdef err_cookie set_error_handler(err_cookie handler)
+
+ # Set the default error handler set by silence_errors/unsilence_errors
+-cdef void set_default_error_handler() nogil
++cdef void set_default_error_handler() noexcept nogil
Index: pkgsrc/devel/py-h5py/patches/patch-h5py___errors.pyx
diff -u /dev/null pkgsrc/devel/py-h5py/patches/patch-h5py___errors.pyx:1.1
--- /dev/null Wed Dec 13 20:29:09 2023
+++ pkgsrc/devel/py-h5py/patches/patch-h5py___errors.pyx Wed Dec 13 20:29:09 2023
@@ -0,0 +1,25 @@
+$NetBSD: patch-h5py___errors.pyx,v 1.1 2023/12/13 20:29:09 wiz Exp $
+
+Fix build with Cython 3.
+https://github.com/h5py/h5py/pull/2345
+
+--- h5py/_errors.pyx.orig 2023-04-26 15:08:31.000000000 +0000
++++ 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 noexcept:
++cdef herr_t walk_cb(unsigned int n, const H5E_error_t *desc, void *e) noexcept nogil:
+
+ cdef err_data_t *ee = <err_data_t*>e
+
+@@ -168,7 +168,7 @@ cdef err_cookie _error_handler # Store
+ _error_handler.func = NULL
+ _error_handler.data = NULL
+
+-cdef void set_default_error_handler() nogil:
++cdef void set_default_error_handler() noexcept nogil:
+ """Set h5py's current default error handler"""
+ H5Eset_auto(<hid_t>H5E_DEFAULT, _error_handler.func, _error_handler.data)
+
Index: pkgsrc/devel/py-h5py/patches/patch-h5py___locks.pxi
diff -u /dev/null pkgsrc/devel/py-h5py/patches/patch-h5py___locks.pxi:1.1
--- /dev/null Wed Dec 13 20:29:09 2023
+++ pkgsrc/devel/py-h5py/patches/patch-h5py___locks.pxi Wed Dec 13 20:29:09 2023
@@ -0,0 +1,34 @@
+$NetBSD: patch-h5py___locks.pxi,v 1.1 2023/12/13 20:29:09 wiz Exp $
+
+Fix build with Cython 3.
+https://github.com/h5py/h5py/pull/2345
+
+--- h5py/_locks.pxi.orig 2021-05-09 11:55:36.000000000 +0000
++++ h5py/_locks.pxi
+@@ -63,7 +63,7 @@ cdef class FastRLock:
+ return self._owner == pythread.PyThread_get_thread_ident()
+
+
+-cdef inline bint lock_lock(FastRLock lock, long current_thread, bint blocking) nogil:
++cdef inline bint lock_lock(FastRLock lock, long current_thread, bint blocking) noexcept nogil:
+ # Note that this function *must* hold the GIL when being called.
+ # We just use 'nogil' in the signature to make sure that no Python
+ # code execution slips in that might free the GIL
+@@ -83,7 +83,7 @@ cdef inline bint lock_lock(FastRLock loc
+ lock, current_thread,
+ pythread.WAIT_LOCK if blocking else pythread.NOWAIT_LOCK)
+
+-cdef bint _acquire_lock(FastRLock lock, long current_thread, int wait) nogil:
++cdef bint _acquire_lock(FastRLock lock, long current_thread, int wait) noexcept nogil:
+ # Note that this function *must* hold the GIL when being called.
+ # We just use 'nogil' in the signature to make sure that no Python
+ # code execution slips in that might free the GIL
+@@ -111,7 +111,7 @@ cdef bint _acquire_lock(FastRLock lock,
+ lock._count = 1
+ return 1
+
+-cdef inline void unlock_lock(FastRLock lock) nogil:
++cdef inline void unlock_lock(FastRLock lock) noexcept nogil:
+ # Note that this function *must* hold the GIL when being called.
+ # We just use 'nogil' in the signature to make sure that no Python
+ # code execution slips in that might free the GIL
Index: pkgsrc/devel/py-h5py/patches/patch-h5py___proxy.pyx
diff -u /dev/null pkgsrc/devel/py-h5py/patches/patch-h5py___proxy.pyx:1.1
--- /dev/null Wed Dec 13 20:29:09 2023
+++ pkgsrc/devel/py-h5py/patches/patch-h5py___proxy.pyx Wed Dec 13 20:29:09 2023
@@ -0,0 +1,25 @@
+$NetBSD: patch-h5py___proxy.pyx,v 1.1 2023/12/13 20:29:09 wiz Exp $
+
+Fix build with Cython 3.
+https://github.com/h5py/h5py/pull/2345
+
+--- h5py/_proxy.pyx.orig 2023-10-04 09:21:14.000000000 +0000
++++ h5py/_proxy.pyx
+@@ -241,7 +241,7 @@ ctypedef struct h5py_scatter_t:
+ void* buf
+
+ cdef herr_t h5py_scatter_cb(void* elem, hid_t type_id, unsigned ndim,
+- const hsize_t *point, void *operator_data) nogil except -1:
++ const hsize_t *point, void *operator_data) except -1 nogil:
+ cdef h5py_scatter_t* info = <h5py_scatter_t*>operator_data
+
+ memcpy(elem, (<char*>info[0].buf)+((info[0].i)*(info[0].elsize)),
+@@ -252,7 +252,7 @@ cdef herr_t h5py_scatter_cb(void* elem,
+ return 0
+
+ cdef herr_t h5py_gather_cb(void* elem, hid_t type_id, unsigned ndim,
+- const hsize_t *point, void *operator_data) nogil except -1:
++ const hsize_t *point, void *operator_data) except -1 nogil:
+ cdef h5py_scatter_t* info = <h5py_scatter_t*>operator_data
+
+ memcpy((<char*>info[0].buf)+((info[0].i)*(info[0].elsize)), elem,
Index: pkgsrc/devel/py-h5py/patches/patch-h5py_api__compat.h
diff -u /dev/null pkgsrc/devel/py-h5py/patches/patch-h5py_api__compat.h:1.1
--- /dev/null Wed Dec 13 20:29:09 2023
+++ pkgsrc/devel/py-h5py/patches/patch-h5py_api__compat.h Wed Dec 13 20:29:09 2023
@@ -0,0 +1,36 @@
+$NetBSD: patch-h5py_api__compat.h,v 1.1 2023/12/13 20:29:09 wiz Exp $
+
+Fix build with Cython 3.
+https://github.com/h5py/h5py/pull/2345
+
+--- h5py/api_compat.h.orig 2021-05-09 11:55:36.000000000 +0000
++++ h5py/api_compat.h
+@@ -24,7 +24,6 @@ typedef void *PyMPI_MPI_Message;
+ #include <stddef.h>
+ #include "Python.h"
+ #include "numpy/arrayobject.h"
+-#include "hdf5.h"
+
+ /* The HOFFSET macro can't be used from Cython. */
+
+@@ -35,14 +34,14 @@ typedef void *PyMPI_MPI_Message;
+ #define h5py_size_n256 (sizeof(npy_complex256))
+ #endif
+
+-#define h5py_offset_n64_real (HOFFSET(npy_complex64, real))
+-#define h5py_offset_n64_imag (HOFFSET(npy_complex64, imag))
+-#define h5py_offset_n128_real (HOFFSET(npy_complex128, real))
+-#define h5py_offset_n128_imag (HOFFSET(npy_complex128, imag))
++#define h5py_offset_n64_real (0)
++#define h5py_offset_n64_imag (sizeof(float))
++#define h5py_offset_n128_real (0)
++#define h5py_offset_n128_imag (sizeof(double))
+
+ #ifdef NPY_COMPLEX256
+-#define h5py_offset_n256_real (HOFFSET(npy_complex256, real))
+-#define h5py_offset_n256_imag (HOFFSET(npy_complex256, imag))
++#define h5py_offset_n256_real (0)
++#define h5py_offset_n256_imag (sizeof(long double))
+ #endif
+
+ #endif
Index: pkgsrc/devel/py-h5py/patches/patch-h5py_api__types__hdf5.pxd
diff -u /dev/null pkgsrc/devel/py-h5py/patches/patch-h5py_api__types__hdf5.pxd:1.1
--- /dev/null Wed Dec 13 20:29:09 2023
+++ pkgsrc/devel/py-h5py/patches/patch-h5py_api__types__hdf5.pxd Wed Dec 13 20:29:09 2023
@@ -0,0 +1,87 @@
+$NetBSD: patch-h5py_api__types__hdf5.pxd,v 1.1 2023/12/13 20:29:09 wiz Exp $
+
+Fix build with Cython 3.
+https://github.com/h5py/h5py/pull/2345
+
+--- h5py/api_types_hdf5.pxd.orig 2023-10-09 14:16:30.000000000 +0000
++++ h5py/api_types_hdf5.pxd
+@@ -257,27 +257,27 @@ cdef extern from "hdf5.h":
+ herr_t (*sb_encode)(H5FD_t *file, char *name, unsigned char *p)
+ herr_t (*sb_decode)(H5FD_t *f, const char *name, const unsigned char *p)
+ size_t fapl_size
+- void * (*fapl_get)(H5FD_t *file)
+- void * (*fapl_copy)(const void *fapl)
+- herr_t (*fapl_free)(void *fapl)
++ void * (*fapl_get)(H5FD_t *file) except *
++ void * (*fapl_copy)(const void *fapl) except *
++ herr_t (*fapl_free)(void *fapl) except -1
+ size_t dxpl_size
+ void * (*dxpl_copy)(const void *dxpl)
+ herr_t (*dxpl_free)(void *dxpl)
+- H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr)
+- herr_t (*close)(H5FD_t *file)
++ H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) except *
++ herr_t (*close)(H5FD_t *file) except -1
+ int (*cmp)(const H5FD_t *f1, const H5FD_t *f2)
+ herr_t (*query)(const H5FD_t *f1, unsigned long *flags)
+ herr_t (*get_type_map)(const H5FD_t *file, H5FD_mem_t *type_map)
+ haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
+ herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
+- haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type)
+- herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
+- haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type)
++ haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) noexcept
++ herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) noexcept
++ haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) except -1
+ herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle)
+- herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer)
+- herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer)
+- herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
+- herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
++ herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) except *
++ herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) except *
++ herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1
++ herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1
+ herr_t (*lock)(H5FD_t *file, hbool_t rw)
+ herr_t (*unlock)(H5FD_t *file)
+ H5FD_mem_t fl_map[<int>H5FD_MEM_NTYPES]
+@@ -295,27 +295,27 @@ cdef extern from "hdf5.h":
+ herr_t (*sb_encode)(H5FD_t *file, char *name, unsigned char *p)
+ herr_t (*sb_decode)(H5FD_t *f, const char *name, const unsigned char *p)
+ size_t fapl_size
+- void * (*fapl_get)(H5FD_t *file)
+- void * (*fapl_copy)(const void *fapl)
+- herr_t (*fapl_free)(void *fapl)
++ void * (*fapl_get)(H5FD_t *file) except *
++ void * (*fapl_copy)(const void *fapl) except *
++ herr_t (*fapl_free)(void *fapl) except -1
+ size_t dxpl_size
+ void * (*dxpl_copy)(const void *dxpl)
+ herr_t (*dxpl_free)(void *dxpl)
+- H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr)
+- herr_t (*close)(H5FD_t *file)
++ H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) except *
++ herr_t (*close)(H5FD_t *file) except -1
+ int (*cmp)(const H5FD_t *f1, const H5FD_t *f2)
+ herr_t (*query)(const H5FD_t *f1, unsigned long *flags)
+ herr_t (*get_type_map)(const H5FD_t *file, H5FD_mem_t *type_map)
+ haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
+ herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size)
+- haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type)
+- herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr)
+- haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type)
++ haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) noexcept
++ herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) noexcept
++ haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) except -1
+ herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle)
+- herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer)
+- herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer)
+- herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
+- herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing)
++ herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) except *
++ herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) except *
++ herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1
++ herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1
+ herr_t (*lock)(H5FD_t *file, hbool_t rw)
+ herr_t (*unlock)(H5FD_t *file)
+ H5FD_mem_t fl_map[<int>H5FD_MEM_NTYPES]
Index: pkgsrc/devel/py-h5py/patches/patch-h5py_h5fd.pyx
diff -u /dev/null pkgsrc/devel/py-h5py/patches/patch-h5py_h5fd.pyx:1.1
--- /dev/null Wed Dec 13 20:29:09 2023
+++ pkgsrc/devel/py-h5py/patches/patch-h5py_h5fd.pyx Wed Dec 13 20:29:09 2023
@@ -0,0 +1,68 @@
+$NetBSD: patch-h5py_h5fd.pyx,v 1.1 2023/12/13 20:29:09 wiz Exp $
+
+Fix build with Cython 3.
+https://github.com/h5py/h5py/pull/2345
+
+--- h5py/h5fd.pyx.orig 2023-10-05 11:57:54.000000000 +0000
++++ h5py/h5fd.pyx
+@@ -144,10 +144,10 @@ cdef herr_t H5FD_fileobj_close(H5FD_file
+ stdlib_free(f)
+ return 0
+
+-cdef haddr_t H5FD_fileobj_get_eoa(const H5FD_fileobj_t *f, H5FD_mem_t type):
++cdef haddr_t H5FD_fileobj_get_eoa(const H5FD_fileobj_t *f, H5FD_mem_t type) noexcept nogil:
+ return f.eoa
+
+-cdef herr_t H5FD_fileobj_set_eoa(H5FD_fileobj_t *f, H5FD_mem_t type, haddr_t addr):
++cdef herr_t H5FD_fileobj_set_eoa(H5FD_fileobj_t *f, H5FD_mem_t type, haddr_t addr) noexcept nogil:
+ f.eoa = addr
+ return 0
+
+@@ -191,22 +191,38 @@ cdef herr_t H5FD_fileobj_flush(H5FD_file
+ cdef H5FD_class_t info
+ memset(&info, 0, sizeof(info))
+
++# Cython doesn't support "except X" in casting definition currently
++ctypedef herr_t (*file_free_func_ptr)(void *) except -1
++
++ctypedef herr_t (*file_close_func_ptr)(H5FD_t *) except -1
++ctypedef haddr_t (*file_get_eoa_func_ptr)(const H5FD_t *, H5FD_mem_t) noexcept
++ctypedef herr_t (*file_set_eof_func_ptr)(H5FD_t *, H5FD_mem_t, haddr_t) noexcept
++ctypedef haddr_t (*file_get_eof_func_ptr)(const H5FD_t *, H5FD_mem_t) except -1
++ctypedef herr_t (*file_read_func_ptr)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, void*) except -1
++ctypedef herr_t (*file_write_func_ptr)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, const void*) except -1
++ctypedef herr_t (*file_truncate_func_ptr)(H5FD_t *, hid_t, hbool_t) except -1
++ctypedef herr_t (*file_flush_func_ptr)(H5FD_t *, hid_t, hbool_t) except -1
++
++
+ info.name = 'fileobj'
+ info.maxaddr = libc.stdint.SIZE_MAX - 1
+ info.fc_degree = H5F_CLOSE_WEAK
+ info.fapl_size = sizeof(PyObject *)
+ info.fapl_get = <void *(*)(H5FD_t *)>H5FD_fileobj_fapl_get
+ info.fapl_copy = <void *(*)(const void *)>H5FD_fileobj_fapl_copy
+-info.fapl_free = <herr_t (*)(void *)>H5FD_fileobj_fapl_free
++
++info.fapl_free = <file_free_func_ptr>H5FD_fileobj_fapl_free
++
+ info.open = <H5FD_t *(*)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr)>H5FD_fileobj_open
+-info.close = <herr_t (*)(H5FD_t *)>H5FD_fileobj_close
+-info.get_eoa = <haddr_t (*)(const H5FD_t *, H5FD_mem_t)>H5FD_fileobj_get_eoa
+-info.set_eoa = <herr_t (*)(H5FD_t *, H5FD_mem_t, haddr_t)>H5FD_fileobj_set_eoa
+-info.get_eof = <haddr_t (*)(const H5FD_t *, H5FD_mem_t)>H5FD_fileobj_get_eof
+-info.read = <herr_t (*)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, void *)>H5FD_fileobj_read
+-info.write = <herr_t (*)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, const void *)>H5FD_fileobj_write
+-info.truncate = <herr_t (*)(H5FD_t *, hid_t, hbool_t)>H5FD_fileobj_truncate
+-info.flush = <herr_t (*)(H5FD_t *, hid_t, hbool_t)>H5FD_fileobj_flush
++
++info.close = <file_close_func_ptr>H5FD_fileobj_close
++info.get_eoa = <file_get_eoa_func_ptr>H5FD_fileobj_get_eoa
++info.set_eoa = <file_set_eof_func_ptr>H5FD_fileobj_set_eoa
++info.get_eof = <file_get_eof_func_ptr>H5FD_fileobj_get_eof
++info.read = <file_read_func_ptr>H5FD_fileobj_read
++info.write = <file_write_func_ptr>H5FD_fileobj_write
++info.truncate = <file_truncate_func_ptr>H5FD_fileobj_truncate
++info.flush = <file_flush_func_ptr>H5FD_fileobj_flush
+ # H5FD_FLMAP_DICHOTOMY
+ info.fl_map = [H5FD_MEM_SUPER, # default
+ H5FD_MEM_SUPER, # super
Index: pkgsrc/devel/py-h5py/patches/patch-h5py_tests_test__dataset.py
diff -u /dev/null pkgsrc/devel/py-h5py/patches/patch-h5py_tests_test__dataset.py:1.1
--- /dev/null Wed Dec 13 20:29:09 2023
+++ pkgsrc/devel/py-h5py/patches/patch-h5py_tests_test__dataset.py Wed Dec 13 20:29:09 2023
@@ -0,0 +1,19 @@
+$NetBSD: patch-h5py_tests_test__dataset.py,v 1.1 2023/12/13 20:29:09 wiz Exp $
+
+Fix build with Cython 3.
+https://github.com/h5py/h5py/pull/2345
+
+--- h5py/tests/test_dataset.py.orig 2023-10-04 09:21:14.000000000 +0000
++++ h5py/tests/test_dataset.py
+@@ -1939,9 +1939,9 @@ class TestCommutative(BaseDataset):
+ dset = self.f.create_dataset("test", shape, dtype=float,
+ data=np.random.rand(*shape))
+
+- # grab a value from the elements, ie dset[0]
++ # grab a value from the elements, ie dset[0, 0]
+ # check that mask arrays are commutative wrt ==, !=
+- val = np.float64(dset[0])
++ val = np.float64(dset[0, 0])
+
+ assert np.all((val == dset) == (dset == val))
+ assert np.all((val != dset) == (dset != val))
Index: pkgsrc/devel/py-h5py/patches/patch-pyproject.toml
diff -u /dev/null pkgsrc/devel/py-h5py/patches/patch-pyproject.toml:1.1
--- /dev/null Wed Dec 13 20:29:09 2023
+++ pkgsrc/devel/py-h5py/patches/patch-pyproject.toml Wed Dec 13 20:29:09 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-pyproject.toml,v 1.1 2023/12/13 20:29:09 wiz Exp $
+
+Fix build with Cython 3.
+https://github.com/h5py/h5py/pull/2345
+
+--- pyproject.toml.orig 2023-10-04 09:21:14.000000000 +0000
++++ pyproject.toml
+@@ -1,6 +1,6 @@
+ [build-system]
+ requires = [
+- "Cython >=0.29.31,<1",
++ "Cython >=0.29.31,<4",
+ "oldest-supported-numpy",
+ "pkgconfig",
+ "setuptools >=61",
Home |
Main Index |
Thread Index |
Old Index