Hello community, here is the log from the commit of package python-h5py for openSUSE:Factory checked in at 2020-12-15 12:31:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-h5py (Old) and /work/SRC/openSUSE:Factory/.python-h5py.new.2328 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-h5py" Tue Dec 15 12:31:07 2020 rev:17 rq:854906 version:3.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-h5py/python-h5py.changes 2020-11-29 12:30:28.802126691 +0100 +++ /work/SRC/openSUSE:Factory/.python-h5py.new.2328/python-h5py.changes 2020-12-15 12:33:08.552133646 +0100 @@ -1,0 +2,17 @@ +Fri Dec 11 13:48:30 UTC 2020 - Atri Bhattacharya <[email protected]> + +- Replace %__python3 usage by %python_exec. + +------------------------------------------------------------------- +Fri Dec 4 03:15:34 UTC 2020 - Atri Bhattacharya <[email protected]> + +- Enable parallel hdf5: + * Implement multibuild for different flavors of openmpi. + * Export env variables `HDF5_LIBDIR` and `HDF5_INCLUDEDIR` + pointing to the hdf library and headers location when enabling + openmpi flavored builds. + * Add BuildRequires: python-pytest-mpi for mpi tests. + * Replace python rpm macros with their expansions in most cases + to adapt to mpi paths. + +------------------------------------------------------------------- New: ---- _multibuild ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-h5py.spec ++++++ --- /var/tmp/diff_new_pack.EBaF4Y/_old 2020-12-15 12:33:09.180134152 +0100 +++ /var/tmp/diff_new_pack.EBaF4Y/_new 2020-12-15 12:33:09.184134155 +0100 @@ -16,9 +16,56 @@ # +%global flavor @BUILD_FLAVOR@%{nil} + +%define pname python-h5py + +# SECTION MPI DEFINITIONS +%if "%{flavor}" == "openmpi1" +%global mpi_flavor openmpi +%if 0%{?suse_version} <= 1500 +%define mpi_vers %{nil} +%else +%define mpi_vers 1 +%endif +%endif + +%if "%{flavor}" == "openmpi2" +%global mpi_flavor openmpi +%define mpi_vers 2 +%endif + +%if "%{flavor}" == "openmpi3" +%global mpi_flavor openmpi +%define mpi_vers 3 +%endif + +%if "%{flavor}" == "openmpi4" +%global mpi_flavor openmpi +%define mpi_vers 4 +%endif + +%{?mpi_flavor:%{bcond_without mpi}}%{!?mpi_flavor:%{bcond_with mpi}} +%{?with_mpi:%{!?mpi_flavor:error "No MPI family specified!"}} + +%if %{with mpi} +%define my_prefix %{_libdir}/mpi/gcc/%{mpi_flavor}%{?mpi_vers} +%define my_bindir %{my_prefix}/bin +%define my_libdir %{my_prefix}/%{_lib} +%define my_incdir %{my_prefix}/include +%define my_suffix -%{mpi_flavor}%{?mpi_vers} +%else +%define my_prefix %{_prefix} +%define my_bindir %{_bindir} +%define my_libdir %{_libdir} +%define my_incdir %{_includedir} +%define my_datadir %{_datadir} +%endif +# /SECTION MPI DEFINITIONS + %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 -Name: python-h5py +Name: %{pname}%{?my_suffix} Version: 3.1.0 Release: 0 Summary: Python interface to the Hierarchical Data Format library @@ -36,15 +83,20 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes -BuildRequires: hdf5-devel +BuildRequires: hdf5%{?my_suffix}-devel BuildRequires: python-rpm-macros -Requires: hdf5 +Requires: hdf5%{?my_suffix} Requires: python-numpy >= 1.12 Requires: python-six -%requires_eq libhdf5 +%requires_eq libhdf5%{?my_suffix} %if 0%{?suse_version} <= 1500 BuildRequires: %{python_module cached-property} %endif +%if %{with mpi} +BuildRequires: %{mpi_flavor}%{mpi_vers}-devel +BuildRequires: %{python_module mpi4py} +BuildRequires: %{python_module pytest-mpi} +%endif %python_subpackages %description @@ -58,25 +110,46 @@ %autosetup -p1 -n h5py-%{version} %build +%if %{with mpi} +source %{my_bindir}/mpivars.sh +export CC=mpicc +export HDF5_MPI="ON" +export HDF5_LIBDIR=%{my_libdir} +export HDF5_INCLUDEDIR=%{my_incdir} +%endif export CFLAGS="%{optflags} -fno-strict-aliasing" %python_build %install +%if %{with mpi} +%python_exec setup.py install -O1 --skip-build --force --root %{buildroot} --prefix %{my_prefix} +%else %python_install -%python_expand %fdupes %{buildroot}%{$python_sitearch} +%endif +%python_expand %fdupes %{buildroot}%{my_libdir}/python%{python_version}/site-packages/h5py/ %check -# Offset test fails on 32-bit and we don't build against mpi-hdf5 +# Offset test fails on 32-bit +%if %{with mpi} +source %{my_bindir}/mpivars.sh +%endif +export LD_LIBRARY_PATH=%{my_libdir} +export PYTHONPATH=%{buildroot}%{my_libdir}/python%{python_version}/site-packages +export PYTHONDONTWRITEBYTECODE=1 %ifarch %{ix86} -%pytest_arch %{buildroot}%{$python_sitearch}/h5py/tests/ -k 'not (TestMPI or test_float_round_tripping)' +pytest-%{python_version} %{buildroot}%{my_libdir}/python%{python_version}/site-packages/h5py/ %{?with_mpi:-k 'not test_float_round_tripping'}%{!?with_mpi:-k 'not (TestMPI or test_float_round_tripping)'} %else -%pytest_arch %{buildroot}%{$python_sitearch}/h5py/tests/ -k 'not TestMPI' +pytest-%{python_version} %{buildroot}%{my_libdir}/python%{python_version}/site-packages/h5py/ %{!?with_mpi:-k 'not TestMPI'} %endif %files %{python_files} %license lzf/LICENSE.txt %doc README.rst lzf/README.txt examples licenses/* -%{python_sitearch}/h5py/ -%{python_sitearch}/h5py-%{version}-py*.egg-info +%if %{with mpi} +%dir %{my_libdir}/python%{python_version} +%dir %{my_libdir}/python%{python_version}/site-packages +%endif +%{my_libdir}/python%{python_version}/site-packages/h5py/ +%{my_libdir}/python%{python_version}/site-packages/h5py-%{version}-py*.egg-info %changelog ++++++ _multibuild ++++++ <multibuild> <package>openmpi1</package> <package>openmpi2</package> <package>openmpi3</package> <package>openmpi4</package> </multibuild> _______________________________________________ openSUSE Commits mailing list -- [email protected] To unsubscribe, email [email protected] List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/[email protected]
