Open
fix build error for compiling Cython file #23
AtomGit-BotAdd on Nov 26, 2024
fix build error for compiling Cython file #23
Open
Merged fromrefs/pull/23/headintoopenEuler-24.03-LTS
Total: 4 files changed+288-1
| @@ -0,0 +1,151 @@ | |||
| 1 | +From c0a7b9848eedbd3b64c248ed579ee629903231f1 Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: David Hoese <david.hoese@ssec.wisc.edu> | ||
| 3 | +Date: Tue, 28 Nov 2023 09:57:33 -0600 | ||
| 4 | +Subject: [PATCH] Add minimal except definitions for Cython 3 compatibility | ||
| 5 | + | ||
| 6 | +--- | ||
| 7 | + h5py/api_types_hdf5.pxd | 38 +++++++++++++++++++------------------- | ||
| 8 | + h5py/h5fd.pyx | 36 ++++++++++++++++++++++++++---------- | ||
| 9 | + 2 files changed, 45 insertions(+), 29 deletions(-) | ||
| 10 | + | ||
| 11 | +diff --git a/h5py/api_types_hdf5.pxd b/h5py/api_types_hdf5.pxd | ||
| 12 | +index a1369e8a..0523b2fe 100644 | ||
| 13 | +--- a/h5py/api_types_hdf5.pxd | ||
| 14 | ++++ b/h5py/api_types_hdf5.pxd | ||
| 15 | +@@ -259,25 +259,25 @@ cdef extern from "hdf5.h": | ||
| 16 | + size_t fapl_size | ||
| 17 | + void * (*fapl_get)(H5FD_t *file) except * | ||
| 18 | + void * (*fapl_copy)(const void *fapl) except * | ||
| 19 | +- herr_t (*fapl_free)(void *fapl) except * | ||
| 20 | ++ herr_t (*fapl_free)(void *fapl) except -1 | ||
| 21 | + size_t dxpl_size | ||
| 22 | + void * (*dxpl_copy)(const void *dxpl) | ||
| 23 | + herr_t (*dxpl_free)(void *dxpl) | ||
| 24 | + H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) except * | ||
| 25 | +- herr_t (*close)(H5FD_t *file) except * | ||
| 26 | ++ herr_t (*close)(H5FD_t *file) except -1 | ||
| 27 | + int (*cmp)(const H5FD_t *f1, const H5FD_t *f2) | ||
| 28 | + herr_t (*query)(const H5FD_t *f1, unsigned long *flags) | ||
| 29 | + herr_t (*get_type_map)(const H5FD_t *file, H5FD_mem_t *type_map) | ||
| 30 | + haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) | ||
| 31 | + herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size) | ||
| 32 | +- haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) except * | ||
| 33 | +- herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) except * | ||
| 34 | +- haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) except * | ||
| 35 | ++ haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) noexcept | ||
| 36 | ++ herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) noexcept | ||
| 37 | ++ haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) noexcept | ||
| 38 | + herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle) | ||
| 39 | + herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) except * | ||
| 40 | + herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) except * | ||
| 41 | +- herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except * | ||
| 42 | +- herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except * | ||
| 43 | ++ herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1 | ||
| 44 | ++ herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1 | ||
| 45 | + herr_t (*lock)(H5FD_t *file, hbool_t rw) | ||
| 46 | + herr_t (*unlock)(H5FD_t *file) | ||
| 47 | + H5FD_mem_t fl_map[<int>H5FD_MEM_NTYPES] | ||
| 48 | +@@ -295,27 +295,27 @@ cdef extern from "hdf5.h": | ||
| 49 | + herr_t (*sb_encode)(H5FD_t *file, char *name, unsigned char *p) | ||
| 50 | + herr_t (*sb_decode)(H5FD_t *f, const char *name, const unsigned char *p) | ||
| 51 | + size_t fapl_size | ||
| 52 | +- void * (*fapl_get)(H5FD_t *file) | ||
| 53 | +- void * (*fapl_copy)(const void *fapl) | ||
| 54 | +- herr_t (*fapl_free)(void *fapl) | ||
| 55 | ++ void * (*fapl_get)(H5FD_t *file) except * | ||
| 56 | ++ void * (*fapl_copy)(const void *fapl) except * | ||
| 57 | ++ herr_t (*fapl_free)(void *fapl) except -1 | ||
| 58 | + size_t dxpl_size | ||
| 59 | + void * (*dxpl_copy)(const void *dxpl) | ||
| 60 | + herr_t (*dxpl_free)(void *dxpl) | ||
| 61 | +- H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) | ||
| 62 | +- herr_t (*close)(H5FD_t *file) | ||
| 63 | ++ H5FD_t *(*open)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr) except * | ||
| 64 | ++ herr_t (*close)(H5FD_t *file) except -1 | ||
| 65 | + int (*cmp)(const H5FD_t *f1, const H5FD_t *f2) | ||
| 66 | + herr_t (*query)(const H5FD_t *f1, unsigned long *flags) | ||
| 67 | + herr_t (*get_type_map)(const H5FD_t *file, H5FD_mem_t *type_map) | ||
| 68 | + haddr_t (*alloc)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size) | ||
| 69 | + herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size) | ||
| 70 | +- haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) | ||
| 71 | +- herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) | ||
| 72 | +- haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) | ||
| 73 | ++ haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) noexcept | ||
| 74 | ++ herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) noexcept | ||
| 75 | ++ haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) noexcept | ||
| 76 | + herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle) | ||
| 77 | +- herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) | ||
| 78 | +- herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) | ||
| 79 | +- herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) | ||
| 80 | +- herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) | ||
| 81 | ++ herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) except * | ||
| 82 | ++ herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) except * | ||
| 83 | ++ herr_t (*flush)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1 | ||
| 84 | ++ herr_t (*truncate)(H5FD_t *file, hid_t dxpl_id, hbool_t closing) except -1 | ||
| 85 | + herr_t (*lock)(H5FD_t *file, hbool_t rw) | ||
| 86 | + herr_t (*unlock)(H5FD_t *file) | ||
| 87 | + H5FD_mem_t fl_map[<int>H5FD_MEM_NTYPES] | ||
| 88 | +diff --git a/h5py/h5fd.pyx b/h5py/h5fd.pyx | ||
| 89 | +index f1b4aade..5e2ea9cd 100644 | ||
| 90 | +--- a/h5py/h5fd.pyx | ||
| 91 | ++++ b/h5py/h5fd.pyx | ||
| 92 | +@@ -151,7 +151,7 @@ cdef herr_t H5FD_fileobj_set_eoa(H5FD_fileobj_t *f, H5FD_mem_t type, haddr_t add | ||
| 93 | + f.eoa = addr | ||
| 94 | + return 0 | ||
| 95 | + | ||
| 96 | +-cdef haddr_t H5FD_fileobj_get_eof(const H5FD_fileobj_t *f, H5FD_mem_t type) except -1 with gil: # HADDR_UNDEF | ||
| 97 | ++cdef haddr_t H5FD_fileobj_get_eof(const H5FD_fileobj_t *f, H5FD_mem_t type) noexcept with gil: # HADDR_UNDEF | ||
| 98 | + (<object>f.fileobj).seek(0, libc.stdio.SEEK_END) | ||
| 99 | + return (<object>f.fileobj).tell() | ||
| 100 | + | ||
| 101 | +@@ -191,22 +191,38 @@ cdef herr_t H5FD_fileobj_flush(H5FD_fileobj_t *f, hid_t dxpl, hbool_t closing) e | ||
| 102 | + cdef H5FD_class_t info | ||
| 103 | + memset(&info, 0, sizeof(info)) | ||
| 104 | + | ||
| 105 | ++# Cython doesn't support "except X" in casting definition currently | ||
| 106 | ++ctypedef herr_t (*file_free_func_ptr)(void *) except -1 | ||
| 107 | ++ | ||
| 108 | ++ctypedef herr_t (*file_close_func_ptr)(H5FD_t *) except -1 | ||
| 109 | ++ctypedef haddr_t (*file_get_eoa_func_ptr)(const H5FD_t *, H5FD_mem_t) noexcept | ||
| 110 | ++ctypedef herr_t (*file_set_eof_func_ptr)(H5FD_t *, H5FD_mem_t, haddr_t) noexcept | ||
| 111 | ++ctypedef haddr_t (*file_get_eof_func_ptr)(const H5FD_t *, H5FD_mem_t) noexcept | ||
| 112 | ++ctypedef herr_t (*file_read_func_ptr)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, void*) except -1 | ||
| 113 | ++ctypedef herr_t (*file_write_func_ptr)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, const void*) except -1 | ||
| 114 | ++ctypedef herr_t (*file_truncate_func_ptr)(H5FD_t *, hid_t, hbool_t) except -1 | ||
| 115 | ++ctypedef herr_t (*file_flush_func_ptr)(H5FD_t *, hid_t, hbool_t) except -1 | ||
| 116 | ++ | ||
| 117 | ++ | ||
| 118 | + info.name = 'fileobj' | ||
| 119 | + info.maxaddr = libc.stdint.SIZE_MAX - 1 | ||
| 120 | + info.fc_degree = H5F_CLOSE_WEAK | ||
| 121 | + info.fapl_size = sizeof(PyObject *) | ||
| 122 | + info.fapl_get = <void *(*)(H5FD_t *)>H5FD_fileobj_fapl_get | ||
| 123 | + info.fapl_copy = <void *(*)(const void *)>H5FD_fileobj_fapl_copy | ||
| 124 | +-info.fapl_free = <herr_t (*)(void *)>H5FD_fileobj_fapl_free | ||
| 125 | ++ | ||
| 126 | ++info.fapl_free = <file_free_func_ptr>H5FD_fileobj_fapl_free | ||
| 127 | ++ | ||
| 128 | + info.open = <H5FD_t *(*)(const char *name, unsigned flags, hid_t fapl, haddr_t maxaddr)>H5FD_fileobj_open | ||
| 129 | +-info.close = <herr_t (*)(H5FD_t *)>H5FD_fileobj_close | ||
| 130 | +-info.get_eoa = <haddr_t (*)(const H5FD_t *, H5FD_mem_t)>H5FD_fileobj_get_eoa | ||
| 131 | +-info.set_eoa = <herr_t (*)(H5FD_t *, H5FD_mem_t, haddr_t)>H5FD_fileobj_set_eoa | ||
| 132 | +-info.get_eof = <haddr_t (*)(const H5FD_t *, H5FD_mem_t)>H5FD_fileobj_get_eof | ||
| 133 | +-info.read = <herr_t (*)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, void *)>H5FD_fileobj_read | ||
| 134 | +-info.write = <herr_t (*)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, const void *)>H5FD_fileobj_write | ||
| 135 | +-info.truncate = <herr_t (*)(H5FD_t *, hid_t, hbool_t)>H5FD_fileobj_truncate | ||
| 136 | +-info.flush = <herr_t (*)(H5FD_t *, hid_t, hbool_t)>H5FD_fileobj_flush | ||
| 137 | ++ | ||
| 138 | ++info.close = <file_close_func_ptr>H5FD_fileobj_close | ||
| 139 | ++info.get_eoa = <file_get_eoa_func_ptr>H5FD_fileobj_get_eoa | ||
| 140 | ++info.set_eoa = <file_set_eof_func_ptr>H5FD_fileobj_set_eoa | ||
| 141 | ++info.get_eof = <file_get_eof_func_ptr>H5FD_fileobj_get_eof | ||
| 142 | ++info.read = <file_read_func_ptr>H5FD_fileobj_read | ||
| 143 | ++info.write = <file_write_func_ptr>H5FD_fileobj_write | ||
| 144 | ++info.truncate = <file_truncate_func_ptr>H5FD_fileobj_truncate | ||
| 145 | ++info.flush = <file_flush_func_ptr>H5FD_fileobj_flush | ||
| 146 | + # H5FD_FLMAP_DICHOTOMY | ||
| 147 | + info.fl_map = [H5FD_MEM_SUPER, # default | ||
| 148 | + H5FD_MEM_SUPER, # super | ||
| 149 | +-- | ||
| 150 | +2.27.0 | ||
| 151 | + | ||
| @@ -0,0 +1,73 @@ | |||
| 1 | +From eea4cbc6a4b6333182c8d9b43276f8269c49d980 Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: Aleksandar Jelenak <ajelenak@hdfgroup.org> | ||
| 3 | +Date: Wed, 3 Apr 2024 11:29:22 -0400 | ||
| 4 | +Subject: [PATCH] Add page buffer and fix file locking tests | ||
| 5 | + | ||
| 6 | +--- | ||
| 7 | + h5py/tests/test_file.py | 36 ++++++++++++++++++++++++++++++++++-- | ||
| 8 | + 1 file changed, 34 insertions(+), 2 deletions(-) | ||
| 9 | + | ||
| 10 | +diff --git a/h5py/tests/test_file.py b/h5py/tests/test_file.py | ||
| 11 | +index 1aa38731..0ceddc37 100644 | ||
| 12 | +--- a/h5py/tests/test_file.py | ||
| 13 | ++++ b/h5py/tests/test_file.py | ||
| 14 | +@@ -213,6 +213,8 @@ class TestPageBuffering(TestCase): | ||
| 15 | + fapl = f.id.get_access_plist() | ||
| 16 | + self.assertEqual(fapl.get_page_buffer_size(), (pbs, mm, mr)) | ||
| 17 | + | ||
| 18 | ++ @pytest.mark.skipif(h5py.version.hdf5_version_tuple > (1, 14, 3), | ||
| 19 | ++ reason='Requires HDF5 <= 1.14.3') | ||
| 20 | + def test_too_small_pbs(self): | ||
| 21 | + """Page buffer size must be greater than file space page size.""" | ||
| 22 | + fname = self.mktemp() | ||
| 23 | +@@ -222,6 +224,30 @@ class TestPageBuffering(TestCase): | ||
| 24 | + with self.assertRaises(OSError): | ||
| 25 | + File(fname, mode="r", page_buf_size=fsp-1) | ||
| 26 | + | ||
| 27 | ++ @pytest.mark.skipif(h5py.version.hdf5_version_tuple < (1, 14, 4), | ||
| 28 | ++ reason='Requires HDF5 >= 1.14.4') | ||
| 29 | ++ def test_open_nonpage_pbs(self): | ||
| 30 | ++ """Open non-PAGE file with page buffer set.""" | ||
| 31 | ++ fname = self.mktemp() | ||
| 32 | ++ fsp = 16 * 1024 | ||
| 33 | ++ with File(fname, mode='w'): | ||
| 34 | ++ pass | ||
| 35 | ++ with File(fname, mode='r', page_buf_size=fsp) as f: | ||
| 36 | ++ fapl = f.id.get_access_plist() | ||
| 37 | ++ assert fapl.get_page_buffer_size()[0] == 0 | ||
| 38 | ++ | ||
| 39 | ++ @pytest.mark.skipif(h5py.version.hdf5_version_tuple < (1, 14, 4), | ||
| 40 | ++ reason='Requires HDF5 >= 1.14.4') | ||
| 41 | ++ def test_smaller_pbs(self): | ||
| 42 | ++ """Adjust page buffer size automatically when smaller than file page.""" | ||
| 43 | ++ fname = self.mktemp() | ||
| 44 | ++ fsp = 16 * 1024 | ||
| 45 | ++ with File(fname, mode='w', fs_strategy='page', fs_page_size=fsp): | ||
| 46 | ++ pass | ||
| 47 | ++ with File(fname, mode='r', page_buf_size=fsp-100) as f: | ||
| 48 | ++ fapl = f.id.get_access_plist() | ||
| 49 | ++ assert fapl.get_page_buffer_size()[0] == fsp | ||
| 50 | ++ | ||
| 51 | + def test_actual_pbs(self): | ||
| 52 | + """Verify actual page buffer size.""" | ||
| 53 | + fname = self.mktemp() | ||
| 54 | +@@ -923,8 +949,14 @@ class TestFileLocking: | ||
| 55 | + with h5py.File(fname, mode="r", locking=True) as h5f_read: | ||
| 56 | + pass | ||
| 57 | + | ||
| 58 | +- with h5py.File(fname, mode="r", locking='best-effort') as h5f_read: | ||
| 59 | +- pass | ||
| 60 | ++ if h5py.version.hdf5_version_tuple < (1, 14, 4): | ||
| 61 | ++ with h5py.File(fname, mode="r", locking='best-effort') as h5f_read: | ||
| 62 | ++ pass | ||
| 63 | ++ else: | ||
| 64 | ++ with pytest.raises(OSError): | ||
| 65 | ++ with h5py.File(fname, mode="r", locking='best-effort') as h5f_read: | ||
| 66 | ++ pass | ||
| 67 | ++ | ||
| 68 | + | ||
| 69 | + def test_unsupported_locking(self, tmp_path): | ||
| 70 | + """Test with erroneous file locking value""" | ||
| 71 | +-- | ||
| 72 | +2.27.0 | ||
| 73 | + | ||
| @@ -0,0 +1,57 @@ | |||
| 1 | +From d6b267d980b391561047af0e573d26140c7d35bd Mon Sep 17 00:00:00 2001 | ||
| 2 | +From: David Hoese <david.hoese@ssec.wisc.edu> | ||
| 3 | +Date: Fri, 1 Dec 2023 09:49:29 -0600 | ||
| 4 | +Subject: [PATCH] Fix get_eof exception definition | ||
| 5 | + | ||
| 6 | +--- | ||
| 7 | + h5py/api_types_hdf5.pxd | 4 ++-- | ||
| 8 | + h5py/h5fd.pyx | 4 ++-- | ||
| 9 | + 2 files changed, 4 insertions(+), 4 deletions(-) | ||
| 10 | + | ||
| 11 | +diff --git a/h5py/api_types_hdf5.pxd b/h5py/api_types_hdf5.pxd | ||
| 12 | +index 6e2fc239..099e0f58 100644 | ||
| 13 | +--- a/h5py/api_types_hdf5.pxd | ||
| 14 | ++++ b/h5py/api_types_hdf5.pxd | ||
| 15 | +@@ -272,7 +272,7 @@ cdef extern from "hdf5.h": | ||
| 16 | + herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size) | ||
| 17 | + haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) noexcept | ||
| 18 | + herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) noexcept | ||
| 19 | +- haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) noexcept | ||
| 20 | ++ haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) except -1 | ||
| 21 | + herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle) | ||
| 22 | + herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) except * | ||
| 23 | + herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) except * | ||
| 24 | +@@ -310,7 +310,7 @@ cdef extern from "hdf5.h": | ||
| 25 | + herr_t (*free)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size) | ||
| 26 | + haddr_t (*get_eoa)(const H5FD_t *file, H5FD_mem_t type) noexcept | ||
| 27 | + herr_t (*set_eoa)(H5FD_t *file, H5FD_mem_t type, haddr_t addr) noexcept | ||
| 28 | +- haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) noexcept | ||
| 29 | ++ haddr_t (*get_eof)(const H5FD_t *file, H5FD_mem_t type) except -1 | ||
| 30 | + herr_t (*get_handle)(H5FD_t *file, hid_t fapl, void**file_handle) | ||
| 31 | + herr_t (*read)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, void *buffer) except * | ||
| 32 | + herr_t (*write)(H5FD_t *file, H5FD_mem_t type, hid_t dxpl, haddr_t addr, size_t size, const void *buffer) except * | ||
| 33 | +diff --git a/h5py/h5fd.pyx b/h5py/h5fd.pyx | ||
| 34 | +index 5e2ea9cd..d39cf68f 100644 | ||
| 35 | +--- a/h5py/h5fd.pyx | ||
| 36 | ++++ b/h5py/h5fd.pyx | ||
| 37 | +@@ -151,7 +151,7 @@ cdef herr_t H5FD_fileobj_set_eoa(H5FD_fileobj_t *f, H5FD_mem_t type, haddr_t add | ||
| 38 | + f.eoa = addr | ||
| 39 | + return 0 | ||
| 40 | + | ||
| 41 | +-cdef haddr_t H5FD_fileobj_get_eof(const H5FD_fileobj_t *f, H5FD_mem_t type) noexcept with gil: # HADDR_UNDEF | ||
| 42 | ++cdef haddr_t H5FD_fileobj_get_eof(const H5FD_fileobj_t *f, H5FD_mem_t type) except -1 with gil: # HADDR_UNDEF | ||
| 43 | + (<object>f.fileobj).seek(0, libc.stdio.SEEK_END) | ||
| 44 | + return (<object>f.fileobj).tell() | ||
| 45 | + | ||
| 46 | +@@ -197,7 +197,7 @@ ctypedef herr_t (*file_free_func_ptr)(void *) except -1 | ||
| 47 | + ctypedef herr_t (*file_close_func_ptr)(H5FD_t *) except -1 | ||
| 48 | + ctypedef haddr_t (*file_get_eoa_func_ptr)(const H5FD_t *, H5FD_mem_t) noexcept | ||
| 49 | + ctypedef herr_t (*file_set_eof_func_ptr)(H5FD_t *, H5FD_mem_t, haddr_t) noexcept | ||
| 50 | +-ctypedef haddr_t (*file_get_eof_func_ptr)(const H5FD_t *, H5FD_mem_t) noexcept | ||
| 51 | ++ctypedef haddr_t (*file_get_eof_func_ptr)(const H5FD_t *, H5FD_mem_t) except -1 | ||
| 52 | + ctypedef herr_t (*file_read_func_ptr)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, void*) except -1 | ||
| 53 | + ctypedef herr_t (*file_write_func_ptr)(H5FD_t *, H5FD_mem_t, hid_t, haddr_t, size_t, const void*) except -1 | ||
| 54 | + ctypedef herr_t (*file_truncate_func_ptr)(H5FD_t *, hid_t, hbool_t) except -1 | ||
| 55 | +-- | ||
| 56 | +2.27.0 | ||
| 57 | + | ||
| @@ -3,12 +3,15 @@ | |||
| 3 | Summary: A high- and low-level interface to the HDF5 library from Python | 3 | Summary: A high- and low-level interface to the HDF5 library from Python |
| 4 | Name: python-h5py | 4 | Name: python-h5py |
| 5 | Version: 3.10.0 | 5 | Version: 3.10.0 |
| 6 | -Release: 1 | 6 | +Release: 2 |
| 7 | License: BSD | 7 | License: BSD |
| 8 | URL: http://www.h5py.org/ | 8 | URL: http://www.h5py.org/ |
| 9 | Source0: https://github.com/h5py/h5py/archive/refs/tags/%{version}.tar.gz | 9 | Source0: https://github.com/h5py/h5py/archive/refs/tags/%{version}.tar.gz |
| 10 | 10 | ||
| 11 | Patch1: Fix-compiling-fileobj-file-driver-with-Cython-3.0.patch | 11 | Patch1: Fix-compiling-fileobj-file-driver-with-Cython-3.0.patch |
| 12 | +Patch2: Add-minimal-except-definitions-for-Cython-3-compatib.patch | ||
| 13 | +Patch3: Add-page-buffer-and-fix-file-locking-tests.patch | ||
| 14 | +Patch4: Fix-get_eof-exception-definition.patch | ||
| 12 | 15 | ||
| 13 | BuildRequires: gcc | 16 | BuildRequires: gcc |
| 14 | BuildRequires: hdf5-devel | 17 | BuildRequires: hdf5-devel |
| @@ -55,6 +58,9 @@ A high- and low-level interface to the HDF5 library from Python3 | |||
| 55 | %{python3_sitearch}/%{modname}-%{version}-*.egg-info | 58 | %{python3_sitearch}/%{modname}-%{version}-*.egg-info |
| 56 | 59 | ||
| 57 | %changelog | 60 | %changelog |
| 61 | +* Tue Nov 26 2024 zhangxianjun <zhangxianjun@kylinos.cn> - 3.10.0-2 | ||
| 62 | +- fix build error due to hdf5 upgrade | ||
| 63 | + | ||
| 58 | * Fri Jan 26 2024 wangjiang <wangjiang37@h-partners.com> - 3.10.0-1 | 64 | * Fri Jan 26 2024 wangjiang <wangjiang37@h-partners.com> - 3.10.0-1 |
| 59 | - update version to 3.10.0 | 65 | - update version to 3.10.0 |
| 60 | 66 | ||