diff --git a/h5py-3.6.0-ppc-float128.patch b/h5py-3.6.0-ppc-float128.patch new file mode 100644 index 0000000..6f2a4fe --- /dev/null +++ b/h5py-3.6.0-ppc-float128.patch @@ -0,0 +1,24 @@ +diff --git a/h5py/h5t.pyx b/h5py/h5t.pyx +index 86183d5..a86cbed 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.spec b/h5py.spec index 3af4132..8bf2d67 100644 --- a/h5py.spec +++ b/h5py.spec @@ -4,10 +4,11 @@ Summary: A Python interface to the HDF5 library Name: h5py Version: 3.6.0 -Release: 1%{?dist} +Release: 1.1%{?dist} License: BSD URL: http://www.h5py.org/ Source0: https://files.pythonhosted.org/packages/source/h/h5py/h5py-%{version}.tar.gz +Patch0: h5py-3.6.0-ppc-float128.patch BuildRequires: gcc BuildRequires: hdf5-devel BuildRequires: liblzf-devel @@ -76,6 +77,9 @@ Requires: mpich %prep %setup -q -c -n %{name}-%{version} +pushd %{name}-%{version} +%patch0 -p1 +popd mv %{name}-%{version} serial cd serial %{__python3} api_gen.py @@ -197,6 +201,9 @@ mpirun %{__python3} -m pytest --pyargs h5py -rxXs --with-mpi ${PYTHONPATH} || ex %changelog +* Tue Jun 14 2022 Terje Rosten - 3.6.0-1.1 +- Backport rhbz#2096956 to fc36 + * Sun Jan 23 2022 Terje Rosten - 3.6.0-1 - Update to 3.6.0