diff --git a/3.10.0.tar.gz b/3.10.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6490e679cf7ee9eb4c330c27ef2e2dd7d12c4d93 Binary files /dev/null and b/3.10.0.tar.gz differ diff --git a/3.9.0.tar.gz b/3.9.0.tar.gz deleted file mode 100644 index 6d3eb4587f74ccf9d7cce2f2daba3b19f1f19d91..0000000000000000000000000000000000000000 Binary files a/3.9.0.tar.gz and /dev/null differ diff --git a/Fix-compiling-fileobj-file-driver-with-Cython-3.0.patch b/Fix-compiling-fileobj-file-driver-with-Cython-3.0.patch new file mode 100644 index 0000000000000000000000000000000000000000..f6bbdf05500de0e4511bc6de4494e84b9e3ff041 --- /dev/null +++ b/Fix-compiling-fileobj-file-driver-with-Cython-3.0.patch @@ -0,0 +1,74 @@ +From b8cc539ce501f95b7f9720b318c54672c512ec16 Mon Sep 17 00:00:00 2001 +From: Thomas Kluyver +Date: Thu, 5 Oct 2023 12:44:12 +0100 +Subject: [PATCH] Fix compiling fileobj file driver with Cython 3.0 + +--- + h5py/api_types_hdf5.pxd | 24 ++++++++++++------------ + h5py/h5fd.pyx | 4 ++-- + 2 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/h5py/api_types_hdf5.pxd b/h5py/api_types_hdf5.pxd +index f3d537c4..a1369e8a 100644 +--- a/h5py/api_types_hdf5.pxd ++++ b/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 * + 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 * + 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) except * ++ herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) except * ++ haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) except * + 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 * ++ herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except * + herr_t (*lock)(H5FD_t *file, hbool_t rw) + herr_t (*unlock)(H5FD_t *file) + H5FD_mem_t fl_map[H5FD_MEM_NTYPES] +diff --git a/h5py/h5fd.pyx b/h5py/h5fd.pyx +index e9746057..f1b4aade 100644 +--- a/h5py/h5fd.pyx ++++ b/h5py/h5fd.pyx +@@ -144,10 +144,10 @@ cdef herr_t H5FD_fileobj_close(H5FD_fileobj_t *f) except -1 with gil: + 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 + +-- +2.40.1 + diff --git a/python-h5py.spec b/python-h5py.spec index 45345ae38c386602da623ce7a0221e5421448917..32949287742634f9b4ac1d65df95cf6cfb8d9133 100644 --- a/python-h5py.spec +++ b/python-h5py.spec @@ -2,12 +2,14 @@ Summary: A high- and low-level interface to the HDF5 library from Python Name: python-h5py -Version: 3.9.0 +Version: 3.10.0 Release: 1 License: BSD URL: http://www.h5py.org/ Source0: https://github.com/h5py/h5py/archive/refs/tags/%{version}.tar.gz +Patch1: Fix-compiling-fileobj-file-driver-with-Cython-3.0.patch + BuildRequires: gcc BuildRequires: hdf5-devel BuildRequires: python3-devel @@ -34,6 +36,7 @@ A high- and low-level interface to the HDF5 library from Python3 %prep %setup -q -n %{modname}-%{version} +%autopatch -p1 %{__python3} api_gen.py %build @@ -52,6 +55,9 @@ A high- and low-level interface to the HDF5 library from Python3 %{python3_sitearch}/%{modname}-%{version}-*.egg-info %changelog +* Fri Jan 26 2024 wangjiang - 3.10.0-1 +- update version to 3.10.0 + * Fri Jul 28 2023 zhuofeng - 3.9.0-1 - update version to 3.9.0