update version to 3.10.0

This commit is contained in:
wangjiang 2024-01-26 16:48:06 +08:00
parent f640a53d6e
commit d52289fa9c
4 changed files with 81 additions and 1 deletions

BIN
3.10.0.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,74 @@
From b8cc539ce501f95b7f9720b318c54672c512ec16 Mon Sep 17 00:00:00 2001
From: Thomas Kluyver <thomas@kluyver.me.uk>
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[<int>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

View File

@ -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 <wangjiang37@h-partners.com> - 3.10.0-1
- update version to 3.10.0
* Fri Jul 28 2023 zhuofeng <zhuofeng2@huawei.com> - 3.9.0-1
- update version to 3.9.0