Accepting request 921521 from home:frispete:branches:devel:languages:python:numeric

- Fix build for SLES/Leaps

OBS-URL: https://build.opensuse.org/request/show/921521
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pytest-mpi?expand=0&rev=10
This commit is contained in:
Atri Bhattacharya 2021-09-28 13:58:54 +00:00 committed by Git OBS Bridge
parent 5e2ec4a115
commit f944e97b47
2 changed files with 12 additions and 8 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Sep 26 15:50:10 UTC 2021 - Hans-Peter Jansen <hpj@urpla.net>
- Fix build for SLES/Leaps
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Sep 26 14:12:36 UTC 2021 - Hans-Peter Jansen <hpj@urpla.net> Sun Sep 26 14:12:36 UTC 2021 - Hans-Peter Jansen <hpj@urpla.net>

View File

@ -16,11 +16,10 @@
# #
%if 0%{?suse_version} > 1500 %if 0%{?sle_version} && 0%{?sle_version} < 150300
%define mpiver 4 %define mpiver openmpi
%endif %else
%if 0%{?sle_version} >= 150000 %define mpiver openmpi4
%define mpiver 2
%endif %endif
%define modname pytest_mpi %define modname pytest_mpi
@ -42,9 +41,9 @@ Recommends: python-mpi4py
BuildArch: noarch BuildArch: noarch
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module mpi4py} BuildRequires: %{python_module mpi4py}
BuildRequires: %{mpiver}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module sybil} BuildRequires: %{python_module sybil}
BuildRequires: openmpi%{mpiver}
# /SECTION # /SECTION
%python_subpackages %python_subpackages
@ -62,8 +61,8 @@ mpi plugin for pytest to collect information from openmpi-based tests.
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
export PATH=${PATH}:%{_libdir}/mpi/gcc/openmpi%{mpiver}/bin export PATH=${PATH}:%{_libdir}/mpi/gcc/%{mpiver}/bin
source %{_libdir}/mpi/gcc/openmpi%{mpiver}/bin/mpivars.sh source %{_libdir}/mpi/gcc/%{mpiver}/bin/mpivars.sh
%pytest -v -p pytester --runpytest=subprocess %pytest -v -p pytester --runpytest=subprocess
%files %{python_files} %files %{python_files}