Compare commits

..

No commits in common. "rawhide" and "f26" have entirely different histories.
rawhide ... f26

5 changed files with 139 additions and 304 deletions

9
.gitignore vendored
View File

@ -11,12 +11,3 @@
/h5py-2.6.0.tar.gz /h5py-2.6.0.tar.gz
/h5py-2.7.0.tar.gz /h5py-2.7.0.tar.gz
/h5py-2.7.1.tar.gz /h5py-2.7.1.tar.gz
/h5py-2.8.0.tar.gz
/h5py-2.9.0.tar.gz
/h5py-2.10.0.tar.gz
/h5py-3.0.0.tar.gz
/h5py-3.1.0.tar.gz
/h5py-3.2.1.tar.gz
/h5py-3.4.0.tar.gz
/h5py-3.6.0.tar.gz
/h5py-3.7.0.tar.gz

View File

@ -1,23 +0,0 @@
diff -up h5py-3.7.0/h5py/h5t.pyx.orig h5py-3.7.0/h5py/h5t.pyx
--- h5py-3.7.0/h5py/h5t.pyx.orig 2022-06-14 16:31:22.964458579 +0000
+++ h5py-3.7.0/h5py/h5t.pyx 2022-06-14 16:31:46.404768118 +0000
@@ -282,18 +282,7 @@ cdef (int, int, int) _correct_float_info
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

41
h5py-system-lzf.patch Normal file
View File

@ -0,0 +1,41 @@
diff -up h5py-2.7.0/lzf/lzf_filter.c.lzf h5py-2.7.0/lzf/lzf_filter.c
--- h5py-2.7.0/lzf/lzf_filter.c.lzf 2016-12-17 16:12:17.000000000 -0700
+++ h5py-2.7.0/lzf/lzf_filter.c 2017-03-20 12:12:42.416002681 -0600
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <errno.h>
#include "hdf5.h"
-#include "lzf/lzf.h"
+#include "lzf.h"
#include "lzf_filter.h"
/* Our own versions of H5Epush_sim, as it changed in 1.8 */
diff -up h5py-2.7.0/setup_build.py.lzf h5py-2.7.0/setup_build.py
--- h5py-2.7.0/setup_build.py.lzf 2016-12-17 16:12:17.000000000 -0700
+++ h5py-2.7.0/setup_build.py 2017-03-20 12:14:01.575626772 -0600
@@ -31,12 +31,10 @@ MODULES = ['defs','_errors','_objects',
'h5ds', 'h5ac']
-EXTRA_SRC = {'h5z': [ localpath("lzf/lzf_filter.c"),
- localpath("lzf/lzf/lzf_c.c"),
- localpath("lzf/lzf/lzf_d.c")]}
+EXTRA_SRC = {'h5z': [ localpath("lzf/lzf_filter.c")]}
COMPILER_SETTINGS = {
- 'libraries' : ['hdf5', 'hdf5_hl'],
+ 'libraries' : ['hdf5', 'hdf5_hl', 'lzf'],
'include_dirs' : [localpath('lzf')],
'library_dirs' : [],
'define_macros' : [('H5_USE_16_API', None)]
@@ -103,10 +101,6 @@ class h5py_build_ext(build_ext):
settings['include_dirs'].insert(0, op.join(config.hdf5, 'include'))
settings['library_dirs'].insert(0, op.join(config.hdf5, 'lib'))
- # TODO: should this only be done on UNIX?
- if os.name != 'nt':
- settings['runtime_library_dirs'] = settings['library_dirs']
-
def make_extension(module):
sources = [localpath('h5py', module+'.pyx')] + EXTRA_SRC.get(module, [])
return Extension('h5py.'+module, sources, **settings)

368
h5py.spec
View File

@ -1,310 +1,136 @@
%global commit a8e82bcd63de14daddbc84c250a36c0ee8c850f6 %global with_python3 1
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%{?filter_provides_in: %filter_provides_in .*/h5py/.*\.so}
%{?filter_setup}
Summary: A Python interface to the HDF5 library Summary: A Python interface to the HDF5 library
Name: h5py Name: h5py
Version: 3.7.0 Version: 2.7.1
Release: 3%{?dist} Release: 1%{?dist}
Group: Applications/Engineering
License: BSD License: BSD
URL: http://www.h5py.org/ URL: http://www.h5py.org/
Source0: https://files.pythonhosted.org/packages/source/h/h5py/h5py-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/source/h/h5py/h5py-%{version}.tar.gz
# drop the unnecessary workaround for float128 type after # patch to use a system liblzf rather than bundled liblzf
# https://fedoraproject.org/wiki/Changes/PPC64LE_Float128_Transition Patch0: h5py-system-lzf.patch
# in F-36
Patch0: h5py-3.7.0-ppc-float128.patch
BuildRequires: gcc
BuildRequires: hdf5-devel
BuildRequires: liblzf-devel BuildRequires: liblzf-devel
BuildRequires: python%{python3_pkgversion}-Cython >= 0.23 BuildRequires: hdf5-devel >= 1.8.3
BuildRequires: python2-devel >= 2.6
BuildRequires: python-pkgconfig
BuildRequires: python-six
BuildRequires: python-sphinx
BuildRequires: numpy >= 1.6.1
BuildRequires: Cython
%if 0%{?with_python3}
BuildRequires: python-tools
BuildRequires: python%{python3_pkgversion}-devel >= 3.2 BuildRequires: python%{python3_pkgversion}-devel >= 3.2
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-cached_property
BuildRequires: python%{python3_pkgversion}-numpy >= 1.7
BuildRequires: python%{python3_pkgversion}-pkgconfig BuildRequires: python%{python3_pkgversion}-pkgconfig
BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-pytest-mpi
BuildRequires: python%{python3_pkgversion}-six BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-sphinx
# MPI builds BuildRequires: python%{python3_pkgversion}-numpy >= 1.6.1
BuildRequires: hdf5-openmpi-devel BuildRequires: python%{python3_pkgversion}-Cython
BuildRequires: openmpi-devel %endif
BuildRequires: python%{python3_pkgversion}-mpi4py-openmpi
BuildRequires: hdf5-mpich-devel
BuildRequires: mpich-devel
BuildRequires: python%{python3_pkgversion}-mpi4py-mpich
%global _description\ %description
The h5py package provides both a high- and low-level interface to the\ The h5py package provides both a high- and low-level interface to the
HDF5 library from Python. The low-level interface is intended to be a\ HDF5 library from Python. The low-level interface is intended to be a
complete wrapping of the HDF5 API, while the high-level component\ complete wrapping of the HDF5 API, while the high-level component
supports access to HDF5 files, data sets and groups using established\ supports access to HDF5 files, data sets and groups using established
Python and NumPy concepts.\ Python and NumPy concepts.
\
A strong emphasis on automatic conversion between Python (Numpy)\ A strong emphasis on automatic conversion between Python (Numpy)
data types and data structures and their HDF5 equivalents vastly\ data types and data structures and their HDF5 equivalents vastly
simplifies the process of reading and writing data from Python. simplifies the process of reading and writing data from Python.
%description %_description %package -n python2-h5py
Summary: A Python 2 interface to the HDF5 library
%package -n python%{python3_pkgversion}-h5py Group: Applications/Engineering
Summary: %{summary}
Requires: hdf5%{_isa} = %{_hdf5_version} Requires: hdf5%{_isa} = %{_hdf5_version}
Requires: python%{python3_pkgversion}-cached_property Requires: numpy >= 1.6.1
Requires: python%{python3_pkgversion}-numpy >= 1.7 Requires: python2-six
%{?python_provide:%python_provide python2-h5py}
Obsoletes: h5py < 2.6.0-1
Provides: h5py = %{version}-%{release}
%description -n python2-h5py
The h5py package provides both a high- and low-level interface to the
HDF5 library from Python. The low-level interface is intended to be a
complete wrapping of the HDF5 API, while the high-level component
supports access to HDF5 files, data sets and groups using established
Python and NumPy concepts.
A strong emphasis on automatic conversion between Python (Numpy)
data types and data structures and their HDF5 equivalents vastly
simplifies the process of reading and writing data from Python.
This is the Python 2 version of h5py.
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-h5py
Summary: A Python %{python3_version} interface to the HDF5 library
Group: Applications/Engineering
Requires: hdf5%{_isa} = %{_hdf5_version}
Requires: python%{python3_pkgversion}-numpy >= 1.6.1
Requires: python%{python3_pkgversion}-six Requires: python%{python3_pkgversion}-six
%{?python_provide:%python_provide python%{python3_pkgversion}-h5py} %{?python_provide:%python_provide python%{python3_pkgversion}-h5py}
%description -n python%{python3_pkgversion}-h5py %_description
%package -n python%{python3_pkgversion}-h5py-openmpi %description -n python%{python3_pkgversion}-h5py
Summary: A Python interface to the HDF5 library using OpenMPI The h5py package provides both a high- and low-level interface to the
Requires: hdf5%{_isa} = %{_hdf5_version} HDF5 library from Python. The low-level interface is intended to be a
Requires: python%{python3_pkgversion}-cached_property complete wrapping of the HDF5 API, while the high-level component
Requires: python%{python3_pkgversion}-numpy >= 1.7 supports access to HDF5 files, data sets and groups using established
Requires: python%{python3_pkgversion}-six Python and NumPy concepts.
Requires: python3-mpi4py-openmpi
Requires: openmpi
%description -n python%{python3_pkgversion}-h5py-openmpi %_description
%package -n python%{python3_pkgversion}-h5py-mpich
Summary: A Python interface to the HDF5 library using MPICH
Requires: hdf5%{_isa} = %{_hdf5_version}
Requires: python%{python3_pkgversion}-cached_property
Requires: python%{python3_pkgversion}-numpy >= 1.7
Requires: python%{python3_pkgversion}-six
Requires: python3-mpi4py-openmpi
Requires: python3-mpi4py-mpich
Requires: mpich
%description -n python%{python3_pkgversion}-h5py-mpich %_description
A strong emphasis on automatic conversion between Python (Numpy)
data types and data structures and their HDF5 equivalents vastly
simplifies the process of reading and writing data from Python.
This is the Python %{python3_version} version of h5py.
%endif
%prep %prep
%setup -q -c -n %{name}-%{version} %setup -q
%patch0 # use system libzlf and remove private copy
mv %{name}-%{version} serial %patch0 -p1 -b .lzf
cd serial rm -rf lzf/lzf
%{__python3} api_gen.py %{__python} api_gen.py
cd -
for x in mpich openmpi
do
cp -al serial $x
done
%build %build
# Upstream requires a specific numpy without this
export H5PY_SETUP_REQUIRES=0
export H5PY_SYSTEM_LZF=1
# serial
export CFLAGS="%{optflags} -fopenmp" export CFLAGS="%{optflags} -fopenmp"
cd serial %py2_build
%if 0%{?with_python3}
%py3_build %py3_build
cd -
# MPI
export CC=mpicc
export HDF5_MPI="ON"
# openmpi
cd openmpi
%{_openmpi_load}
%py3_build
%{_openmpi_unload}
cd -
# mpich
cd mpich
%{_mpich_load}
%py3_build
%{_mpich_unload}
cd -
%install
# Upstream requires a specific numpy without this
export H5PY_SETUP_REQUIRES=0
export H5PY_SYSTEM_LZF=1
# openmpi
cd openmpi
%py3_install
rm -rf %{buildroot}%{python3_sitearch}/h5py/tests
mkdir -p %{buildroot}%{python3_sitearch}/openmpi
mv %{buildroot}%{python3_sitearch}/%{name}/ \
%{buildroot}%{python3_sitearch}/%{name}*.egg-info \
%{buildroot}%{python3_sitearch}/openmpi
cd -
# mpich
cd mpich
%py3_install
rm -rf %{buildroot}%{python3_sitearch}/h5py/tests
mkdir -p %{buildroot}%{python3_sitearch}/mpich
mv %{buildroot}%{python3_sitearch}/%{name}/ \
%{buildroot}%{python3_sitearch}/%{name}*.egg-info \
%{buildroot}%{python3_sitearch}/mpich
cd -
# serial part must be last (not to overwrite files)
cd serial
%py3_install
rm -rf %{buildroot}%{python3_sitearch}/h5py/tests
cd -
%check
# Upstream requires a specific numpy without this
export H5PY_SETUP_REQUIRES=0
export H5PY_SYSTEM_LZF=1
# i686 test failure
# https://github.com/h5py/h5py/issues/1337
# s390x test failure
# https://github.com/h5py/h5py/issues/1739
%ifarch %ix86
fail=0
%else
fail=1
%endif %endif
export PYTHONPATH=$(echo serial/build/lib*) %install
%{__python3} -m pytest --pyargs h5py -rxXs ${PYTHONPATH} || exit $fail %py2_install
chmod 0755 %{buildroot}%{python_sitearch}/%{name}/*.so
# openmpi %if 0%{?with_python3}
export PYTHONPATH=$(echo openmpi/build/lib*) %py3_install
%{_openmpi_load} %endif
mpirun %{__python3} -m pytest --pyargs h5py -rxXs --with-mpi ${PYTHONPATH} || exit $fail
%{_openmpi_unload}
# mpich %check
export PYTHONPATH=$(echo mpich/build/lib*) %{__python2} setup.py test
%{_mpich_load} %if 0%{?with_python3}
mpirun %{__python3} -m pytest --pyargs h5py -rxXs --with-mpi ${PYTHONPATH} || exit $fail %{__python3} setup.py test
%{_mpich_unload} %endif
%files -n python2-h5py
%license licenses/*.txt
%doc ANN.rst README.rst examples
%{python_sitearch}/%{name}/
%{python_sitearch}/%{name}-%{version}-*.egg-info
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-h5py %files -n python%{python3_pkgversion}-h5py
%license serial/licenses/*.txt %license licenses/*.txt
#doc serial/ANN.rst serial/README.rst serial/examples %doc ANN.rst README.rst examples
%doc serial/README.rst serial/examples
%{python3_sitearch}/%{name}/ %{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}-*.egg-info %{python3_sitearch}/%{name}-%{version}-*.egg-info
%endif
%files -n python%{python3_pkgversion}-h5py-openmpi
%license openmpi/licenses/*.txt
%doc openmpi/README.rst
%{python3_sitearch}/openmpi/%{name}/
%{python3_sitearch}/openmpi/%{name}-%{version}-*.egg-info
%files -n python%{python3_pkgversion}-h5py-mpich
%license mpich/licenses/*.txt
%doc mpich/README.rst
%{python3_sitearch}/mpich/%{name}/
%{python3_sitearch}/mpich/%{name}-%{version}-*.egg-info
%changelog %changelog
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 3.7.0-2
- Rebuilt for Python 3.11
* Tue May 24 2022 Terje Rosten <terje.rosten@ntnu.no> - 3.7.0-1
- Update to 3.7.0
* Sun Jan 23 2022 Terje Rosten <terje.rosten@ntnu.no> - 3.6.0-1
- Update to 3.6.0
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sun Nov 21 2021 Orion Poplawski <orion@nwra.com> - 3.4.0-3
- Rebuild for hdf5 1.12.1
* Sun Oct 03 2021 Terje Rosten <terje.rosten@ntnu.no> - 3.4.0-2
- Revert an upstream commit that caused crash in PySCF (rhbz#2009628)
* Sat Sep 18 2021 Terje Rosten <terje.rosten@ntnu.no> - 3.4.0-1
- Update to 3.4.0
* Tue Aug 10 2021 Orion Poplawski <orion@nwra.com> - 3.2.1-4
- Rebuild for hdf5 1.10.7
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 3.2.1-2
- Rebuilt for Python 3.10
* Tue Mar 09 2021 Orion Poplawski <orion@nwra.com> - 3.2.1-1
- Update to 3.2.1
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Nov 07 2020 Terje Rosten <terje.rosten@ntnu.no> - 3.1.0-1
- Update to 3.1.0
* Fri Oct 30 2020 Orion Poplawski <orion@nwra.com> - 3.0.0-1
- Update to 3.0.0
* Mon Jul 27 2020 Terje Rosten <terje.rosten@ntnu.no> - 2.10.0-4
- Add openmpi and mpich subpackages
* Thu Jun 25 2020 Orion Poplawski <orion@cora.nwra.com> - 2.10.0-3
- Rebuild for hdf5 1.10.6
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.10.0-2
- Rebuilt for Python 3.9
* Sun May 17 2020 Terje Rosten <terje.rosten@ntnu.no> - 2.10.0-1
- Add commits from 2.10.x branch
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.9.0-7
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.9.0-6
- Rebuilt for Python 3.8
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sat Mar 16 2019 Orion Poplawski <orion@nwra.com> - 2.9.0-4
- Rebuild for hdf5 1.10.5
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 14 2019 Miro Hrončok <mhroncok@redhat.com> - 2.9.0-2
- Subpackage python2-h5py has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Mon Jan 7 2019 Orion Poplawski <orion@nwra.com> - 2.9.0-1
- Update to 2.9.0
- Drop python2 for Fedora 30+ (bug #1663834)
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.8.0-2
- Rebuilt for Python 3.7
* Tue Jun 05 2018 Terje Rosten <terje.rosten@ntnu.no> - 2.8.0-1
- Update to 2.8.0
* Thu Mar 01 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.7.1-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
- Minor clean up
* Tue Feb 13 2018 Christian Dersch <lupinix@mailbox.org> - 2.7.1-3
- Added patch h5py-Dont-reorder-compound-types (required for new numpy>=1.14)
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Sep 04 2017 Terje Rosten <terje.rosten@ntnu.no> - 2.7.1-1 * Mon Sep 04 2017 Terje Rosten <terje.rosten@ntnu.no> - 2.7.1-1
- Update to 2.7.1 - Update to 2.7.1

View File

@ -1 +1 @@
SHA512 (h5py-3.7.0.tar.gz) = c10a9a623c88dbc965238cb2057b8924492c762c29610cfdb24f26f878a7322e414d3e5c90d750c2f5cfe1b4949f884bc17f09a126b01a4721ad6e14761174a2 SHA512 (h5py-2.7.1.tar.gz) = b702e3875c2767d2fabe66601820c517671fb5fc3321334aba081950b625435a1262554f39187cd1b41c6069e2b3826db6f0b610bfed2abe5db8a4dd8a29ecfd