The package rpms/h5py.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/h5py.git/commit/?id=ec467971bc4be....
Change:
+%ifarch %ix86 s390x
Thanks.
Full change:
============
commit ec467971bc4be23444686b3619db1a0be4486611
Author: Orion Poplawski <orion(a)nwra.com>
Date: Sun Oct 11 17:00:58 2020 -0600
Update to 3.0.0
diff --git a/.gitignore b/.gitignore
index 8fc6087..9911e98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@
/h5py-2.8.0.tar.gz
/h5py-2.9.0.tar.gz
/h5py-2.10.0.tar.gz
+/h5py-3.0.0.tar.gz
diff --git a/h5py-2.10.x-branch.patch b/h5py-2.10.x-branch.patch
deleted file mode 100644
index b59665d..0000000
--- a/h5py-2.10.x-branch.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-diff --git a/h5py/_hl/dataset.py b/h5py/_hl/dataset.py
-index 981cbcba..55f08f11 100644
---- a/h5py/_hl/dataset.py
-+++ b/h5py/_hl/dataset.py
-@@ -789,6 +789,17 @@ class Dataset(HLObject):
- return r.encode('utf8')
- return r
-
-+ def __dir__(self):
-+ if six.PY3:
-+ names = set(super(Dataset, self).__dir__())
-+ else:
-+ names = set(dir(type(self)))
-+ # ds.value is deprecated, and we want to ensure that Jedi doesn't try
-+ # to call the property (
https://github.com/h5py/h5py/issues/1312), so
-+ # this hides it from tab completions.
-+ names.discard('value')
-+ return sorted(names)
-+
- if hasattr(h5d.DatasetID, "refresh"):
- @with_phil
- def refresh(self):
-diff --git a/h5py/h5t.pyx b/h5py/h5t.pyx
-index 8ddd424b..ba2d5a1b 100644
---- a/h5py/h5t.pyx
-+++ b/h5py/h5t.pyx
-@@ -1369,27 +1369,25 @@ cdef class TypeEnumID(TypeCompositeID):
- def _get_float_dtype_to_hdf5():
- float_le = {}
- float_be = {}
-- h5_be_list = [IEEE_F16BE, IEEE_F32BE, IEEE_F64BE, IEEE_F128BE,
-- LDOUBLE_BE]
-- h5_le_list = [IEEE_F16LE, IEEE_F32LE, IEEE_F64LE, IEEE_F128LE]
-- if MACHINE != 'ppc64le':
-- h5_le_list.append(LDOUBLE_LE)
-+ h5_be_list = [IEEE_F16BE, IEEE_F32BE, IEEE_F64BE, IEEE_F128BE, LDOUBLE_BE]
-+ h5_le_list = [IEEE_F16LE, IEEE_F32LE, IEEE_F64LE, IEEE_F128LE, LDOUBLE_LE]
-+
- for ftype_, finfo, size in _available_ftypes:
- nmant, maxexp, minexp = _correct_float_info(ftype_, finfo)
- for h5type in h5_be_list:
- spos, epos, esize, mpos, msize = h5type.get_fields()
- ebias = h5type.get_ebias()
- if (finfo.iexp == esize and nmant == msize and
-- (maxexp - 1) == ebias
-- ):
-+ (maxexp - 1) == ebias):
- float_be[ftype_] = h5type
-+ break # first found matches, related to #1244
- for h5type in h5_le_list:
- spos, epos, esize, mpos, msize = h5type.get_fields()
- ebias = h5type.get_ebias()
- if (finfo.iexp == esize and nmant == msize and
-- (maxexp - 1) == ebias
-- ):
-+ (maxexp - 1) == ebias):
- float_le[ftype_] = h5type
-+ break # first found matches, related to #1244
- if ORDER_NATIVE == H5T_ORDER_LE:
- float_nt = dict(float_le)
- else:
-diff --git a/h5py/tests/test_dataset.py b/h5py/tests/test_dataset.py
-index b5ba988c..e047b06d 100644
---- a/h5py/tests/test_dataset.py
-+++ b/h5py/tests/test_dataset.py
-@@ -1186,3 +1186,13 @@ class TestLowOpen(BaseDataset):
- del dset
- dsid = h5py.h5d.open(self.f.id, b'x', dapl)
- self.assertIsInstance(dsid, h5py.h5d.DatasetID)
-+
-+
-+def test_hide_value_from_jedi():
-+ from io import BytesIO
-+ buf = BytesIO()
-+ with h5py.File(buf, 'w') as fout:
-+ fout['test'] = [1, 2, 3]
-+ with pytest.warns(UserWarning):
-+ assert hasattr(fout['test'], 'value')
-+ assert 'value' not in dir(fout['test'])
diff --git a/h5py-system-lzf.patch b/h5py-system-lzf.patch
index 7c08852..e634a97 100644
--- a/h5py-system-lzf.patch
+++ b/h5py-system-lzf.patch
@@ -1,5 +1,5 @@
diff --git a/lzf/lzf_filter.c b/lzf/lzf_filter.c
-index 1b973be..67af783 100644
+index 951b1e4c..67c2b95a 100644
--- a/lzf/lzf_filter.c
+++ b/lzf/lzf_filter.c
@@ -26,7 +26,7 @@
@@ -11,27 +11,59 @@ index 1b973be..67af783 100644
#include "lzf_filter.h"
/* Our own versions of H5Epush_sim, as it changed in 1.8 */
+diff --git a/news/system_lzf.rst b/news/system_lzf.rst
+new file mode 100644
+index 00000000..3ec5f6ea
+--- /dev/null
++++ b/news/system_lzf.rst
+@@ -0,0 +1,4 @@
++Building h5py
++-------------
++
++* Allow building against system lzf library by setting H5PY_SYSTEM_LZF=1
diff --git a/setup_build.py b/setup_build.py
-index c0e9a28..30ec420 100644
+index 03c47fa0..3c7c7adb 100644
--- a/setup_build.py
+++ b/setup_build.py
-@@ -33,9 +33,7 @@ MODULES =
['defs','_errors','_objects','_proxy', 'h5fd',
'h5z',
+@@ -33,10 +33,6 @@ MODULES = ['defs', '_errors', '_objects',
'_proxy', 'h5fd', 'h5z',
+ 'h5ds', 'h5ac',
'h5pl']
-
-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")]}
-
- FALLBACK_PATHS = {
- 'include_dirs': [],
-@@ -43,7 +41,7 @@ FALLBACK_PATHS = {
- }
-
+-
COMPILER_SETTINGS = {
-- 'libraries' : ['hdf5', 'hdf5_hl'],
-+ 'libraries' : ['hdf5', 'hdf5_hl', 'lzf'],
+ 'libraries' : ['hdf5', 'hdf5_hl'],
'include_dirs' : [localpath('lzf')],
- 'library_dirs' : [],
- 'define_macros' : [('H5_USE_16_API', None)]
+@@ -46,6 +42,22 @@ COMPILER_SETTINGS = {
+ ]
+ }
+
++EXTRA_SRC = {'h5z': [ localpath("lzf/lzf_filter.c") ]}
++
++# Set the environment variable H5PY_SYSTEM_LZF=1 if we want to
++# use the system lzf library
++if os.environ.get('H5PY_SYSTEM_LZF', '0') == '1':
++ EXTRA_LIBRARIES = {
++ 'h5z': [ 'lzf' ]
++ }
++else:
++ COMPILER_SETTINGS['include_dirs'] += [localpath('lzf/lzf')]
++
++ EXTRA_SRC['h5z'] += [localpath("lzf/lzf/lzf_c.c"),
++ localpath("lzf/lzf/lzf_d.c")]
++
++ EXTRA_LIBRARIES = {}
++
+ if sys.platform.startswith('win'):
+ COMPILER_SETTINGS['include_dirs'].append(localpath('windows'))
+ COMPILER_SETTINGS['define_macros'].extend([
+@@ -98,6 +110,7 @@ class h5py_build_ext(build_ext):
+
+ def make_extension(module):
+ sources = [localpath('h5py', module + '.pyx')] +
EXTRA_SRC.get(module, [])
++ settings['libraries'] += EXTRA_LIBRARIES.get(module, [])
+ return Extension('h5py.' + module, sources, **settings)
+
+ return [make_extension(m) for m in MODULES]
diff --git a/h5py.spec b/h5py.spec
index ce81fb5..f0e249d 100644
--- a/h5py.spec
+++ b/h5py.spec
@@ -1,21 +1,28 @@
+%global commit a8e82bcd63de14daddbc84c250a36c0ee8c850f6
+%global shortcommit %(c=%{commit}; echo ${c:0:7})
+
Summary: A Python interface to the HDF5 library
Name: h5py
-Version: 2.10.0
-Release: 4%{?dist}
+Version: 3.0.0
+Release: 1%{?dist}
License: BSD
URL:
http://www.h5py.org/
Source0:
https://files.pythonhosted.org/packages/source/h/h5py/h5py-%{version}.tar.gz
# patch to use a system liblzf rather than bundled liblzf
+#
https://github.com/h5py/h5py/pull/1697
Patch0: h5py-system-lzf.patch
-Patch1: h5py-2.10.x-branch.patch
+
BuildRequires: gcc
BuildRequires: hdf5-devel
BuildRequires: liblzf-devel
BuildRequires: python%{python3_pkgversion}-Cython >= 0.23
BuildRequires: python%{python3_pkgversion}-devel >= 3.2
+BuildRequires: python%{python3_pkgversion}-cached_property
BuildRequires: python%{python3_pkgversion}-numpy >= 1.7
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}-sphinx
# MPI builds
@@ -42,6 +49,7 @@ simplifies the process of reading and writing data from Python.
%package -n python%{python3_pkgversion}-h5py
Summary: %{summary}
Requires: hdf5%{_isa} = %{_hdf5_version}
+Requires: python%{python3_pkgversion}-cached_property
Requires: python%{python3_pkgversion}-numpy >= 1.7
Requires: python%{python3_pkgversion}-six
%{?python_provide:%python_provide python%{python3_pkgversion}-h5py}
@@ -49,111 +57,155 @@ Requires: python%{python3_pkgversion}-six
%package -n python%{python3_pkgversion}-h5py-openmpi
Summary: A Python interface to the HDF5 library using OpenMPI
+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: 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
+
%prep
-%setup -q
+%setup -q -c -n %{name}-%{version}
+mv %{name}-%{version} serial
+cd serial
# use system libzlf and remove private copy
%patch0 -p1 -b .lzf
-%patch1 -p1 -b .2.10.x
-rm -rf lzf/lzf
+rm -r lzf/lzf
%{__python3} api_gen.py
+cd -
+for x in mpich openmpi
+do
+ cp -al serial $x
+done
+
%build
+# Upstream requires a specific numpy without this
+export H5PY_SETUP_REQUIRES=0
+export H5PY_SYSTEM_LZF=1
# serial
export CFLAGS="%{optflags} -fopenmp"
+cd serial
%py3_build
-mv build serial
+cd -
+
+# MPI
+export CC=mpicc
+export HDF5_MPI="ON"
# openmpi
+cd openmpi
%{_openmpi_load}
-export CFLAGS="%{optflags} -fopenmp -I${MPI_INCLUDE}"
-%{__python3} setup.py configure --mpi
%py3_build
-mv build openmpi
-%{__python3} setup.py configure --reset
%{_openmpi_unload}
+cd -
# mpich
+cd mpich
%{_mpich_load}
-export CFLAGS="%{optflags} -fopenmp -I${MPI_INCLUDE}"
-%{__python3} setup.py configure --mpi
%py3_build
-mv build mpich
-%{__python3} setup.py configure --reset
%{_mpich_unload}
+cd -
+
%install
+# Upstream requires a specific numpy without this
+export H5PY_SETUP_REQUIRES=0
+export H5PY_SYSTEM_LZF=1
# openmpi
-%{_openmpi_load}
-mv openmpi build
-export CFLAGS="%{optflags} -fopenmp -I${MPI_INCLUDE}"
-%{__python3} setup.py configure --mpi
+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
-%{__python3} setup.py configure --reset
-mv build openmpi
-%{_openmpi_unload}
+cd -
# mpich
-%{_mpich_load}
-mv mpich build
-export CFLAGS="%{optflags} -fopenmp -I${MPI_INCLUDE}"
-%{__python3} setup.py configure --mpi
+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
-mv build mpich
-%{__python3} setup.py configure --reset
-%{_mpich_unload}
+cd -
# serial part must be last (not to overwrite files)
-mv serial build
+cd serial
%py3_install
-mv build serial
+rm -rf %{buildroot}%{python3_sitearch}/h5py/tests
+cd -
+
%check
-mv serial build
+# 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
-%ifnarch %ix86
-%{__python3} setup.py test
+# s390x test failure
+#
https://github.com/h5py/h5py/issues/1739
+%ifarch %ix86 s390x
+fail=0
%else
-%{__python3} setup.py test || :
+fail=1
%endif
-mv build serial
+
+export PYTHONPATH=$(echo serial/build/lib*)
+%{__python3} -m pytest --pyargs h5py -rxXs ${PYTHONPATH} || exit $fail
+
+# openmpi
+export PYTHONPATH=$(echo openmpi/build/lib*)
+%{_openmpi_load}
+mpirun %{__python3} -m pytest --pyargs h5py -rxXs --with-mpi ${PYTHONPATH} || exit $fail
+%{_openmpi_unload}
+
+# mpich
+export PYTHONPATH=$(echo mpich/build/lib*)
+%{_mpich_load}
+mpirun %{__python3} -m pytest --pyargs h5py -rxXs --with-mpi ${PYTHONPATH} || exit $fail
+%{_mpich_unload}
+
%files -n python%{python3_pkgversion}-h5py
-%license licenses/*.txt
-%doc ANN.rst README.rst examples
+%license serial/licenses/*.txt
+#doc serial/ANN.rst serial/README.rst serial/examples
+%doc serial/README.rst serial/examples
%{python3_sitearch}/%{name}/
%{python3_sitearch}/%{name}-%{version}-*.egg-info
%files -n python%{python3_pkgversion}-h5py-openmpi
-%license licenses/*.txt
-%doc ANN.rst README.rst
+%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 licenses/*.txt
-%doc ANN.rst README.rst
+%license mpich/licenses/*.txt
+%doc mpich/README.rst
%{python3_sitearch}/mpich/%{name}/
%{python3_sitearch}/mpich/%{name}-%{version}-*.egg-info
+
%changelog
+* Fri Oct 30 2020 Orion Poplawski <orion(a)nwra.com> - 3.0.0-1
+- Update to 3.0.0
+
* Mon Jul 27 2020 Terje Rosten <terje.rosten(a)ntnu.no> - 2.10.0-4
- Add openmpi and mpich subpackages
diff --git a/sources b/sources
index 9ec412f..d38f747 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (h5py-2.10.0.tar.gz) =
c49b04f7dcddf03f36d4f063d79ecbe544e0b1daee432d4a76cfa83dac3a1f2cb144f40a74fb85ea17cb5b778f57f709969ea5d1a2afc5bdd5aecbc9d732898d
+SHA512 (h5py-3.0.0.tar.gz) =
31b604d472dd35e0a4abf30e9d05a3cfeb27cf5fd2b1b1bb682fd37ae7faf486f6b476213dee9e8f4ce9eb6bdb932e2fb1ac1be84870c87249691d0b33843082