diff --git a/h5py-3.10.0-ppc-float128.patch b/h5py-3.10.0-ppc-float128.patch new file mode 100644 index 0000000000000000000000000000000000000000..8a494431f80707a0534a1de5181860b8c71c9e95 --- /dev/null +++ b/h5py-3.10.0-ppc-float128.patch @@ -0,0 +1,24 @@ +diff --git a/h5py/h5t.pyx b/h5py/h5t.pyx +index e7aae14..89418e2 100644 +--- a/h5py/h5t.pyx ++++ b/h5py/h5t.pyx +@@ -282,18 +282,7 @@ cdef (int, int, int) _correct_float_info(ftype_, finfo): + nmant = finfo.nmant + maxexp = finfo.maxexp + minexp = finfo.minexp +- # workaround for numpy's buggy finfo on float128 on ppc64 archs +- if ftype_ == np.longdouble and MACHINE == 'ppc64': +- # values reported by hdf5 +- nmant = 116 +- maxexp = 1024 +- minexp = -1022 +- elif ftype_ == np.longdouble and MACHINE == 'ppc64le': +- # values reported by hdf5 +- nmant = 52 +- maxexp = 1024 +- minexp = -1022 +- elif nmant == 63 and finfo.nexp == 15: ++ if nmant == 63 and finfo.nexp == 15: + # This is an 80-bit float, correct mantissa size + nmant += 1 + diff --git a/h5py-3.10.0-python-crash-file-test2.patch b/h5py-3.10.0-python-crash-file-test2.patch new file mode 100644 index 0000000000000000000000000000000000000000..bf7facb3d853b9625f803a22e646c4636305c499 --- /dev/null +++ b/h5py-3.10.0-python-crash-file-test2.patch @@ -0,0 +1,38 @@ +diff --git a/h5py/tests/test_file2.py b/h5py/tests/test_file2.py +index a0507c6..cf6b88f 100644 +--- a/h5py/tests/test_file2.py ++++ b/h5py/tests/test_file2.py +@@ -197,6 +197,7 @@ class TestFileObj(TestCase): + self.assertRaises(Exception, h5py.File, self, + driver='fileobj', mode='x') + ++ @ut.skip("Incompletely closed files can cause segfaults") + def test_exception_read(self): + + class BrokenBytesIO(io.BytesIO): +@@ -207,6 +208,7 @@ class TestFileObj(TestCase): + f.create_dataset('test', data=list(range(12))) + self.assertRaises(Exception, list, f['test']) + ++ @ut.skip("Incompletely closed files can cause segfaults") + def test_exception_write(self): + + class BrokenBytesIO(io.BytesIO): +@@ -233,7 +235,7 @@ class TestFileObj(TestCase): + f = h5py.File(fileobj, 'w') + fileobj.close() + self.assertRaises(Exception, f.close) +- ++ @ut.skip("Incompletely closed files can cause segfaults") + def test_exception_writeonly(self): + # HDF5 expects read & write access to a file it's writing; + # check that we get the correct exception on a write-only file object. +@@ -243,7 +245,7 @@ class TestFileObj(TestCase): + group = f.create_group("group") + group.create_dataset("data", data='foo', dtype=h5py.string_dtype()) + +- ++ @ut.skip("Incompletely closed files can cause segfaults") + def test_method_vanish(self): + fileobj = io.BytesIO() + f = h5py.File(fileobj, 'w') diff --git a/h5py-3.11.0.tar.gz b/h5py-3.11.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..4d80657e04362ab8ffb1040f599075538290d8bd Binary files /dev/null and b/h5py-3.11.0.tar.gz differ diff --git a/h5py-3.7.0.tar.gz b/h5py-3.7.0.tar.gz deleted file mode 100644 index 3317771f1d9b26f475d5edb0bd901579f287fb33..0000000000000000000000000000000000000000 Binary files a/h5py-3.7.0.tar.gz and /dev/null differ diff --git a/h5py.spec b/h5py.spec index f94212772e2dab07cc5854156f3b085845f8ec5d..813f3cbe14fdd544b751f84ceb0ab1704e16d690 100644 --- a/h5py.spec +++ b/h5py.spec @@ -2,11 +2,16 @@ Summary: A Python interface to the HDF5 library Name: h5py -Version: 3.7.0 +Version: 3.11.0 Release: %{anolis_release}%{?dist} License: BSD URL: http://www.h5py.org/ Source0: https://files.pythonhosted.org/packages/source/h/h5py/h5py-%{version}.tar.gz +Patch0: h5py-3.10.0-ppc-float128.patch +Patch1: h5py-3.10.0-python-crash-file-test2.patch + +ExcludeArch: loongarch64 + BuildRequires: gcc BuildRequires: hdf5-devel BuildRequires: liblzf-devel @@ -74,7 +79,10 @@ Requires: mpich %prep -%setup -q -c -n %{name}-%{version} +%autosetup -N -c -n %{name}-%{version} +pushd %{name}-%{version} +%autopatch -p1 +popd mv %{name}-%{version} serial cd serial %{__python3} api_gen.py @@ -188,5 +196,8 @@ export PYTHONPATH=$(echo mpich/build/lib*) %changelog +* Tue Jun 17 2025 wenxin - 3.11.0-1 +- update to 3.11.0 + * Wed Jun 14 2023 Chunmei Xu - 3.7.0-1 - init from upstream