2020-12-10 11:49:09 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-pytest-mpi
|
|
|
|
#
|
2022-11-08 10:46:35 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2020-12-10 11:49:09 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-09-28 15:58:54 +02:00
|
|
|
%if 0%{?sle_version} && 0%{?sle_version} < 150300
|
|
|
|
%define mpiver openmpi
|
|
|
|
%else
|
|
|
|
%define mpiver openmpi4
|
2021-09-26 16:41:49 +02:00
|
|
|
%endif
|
|
|
|
|
2020-12-10 11:49:09 +01:00
|
|
|
%define modname pytest_mpi
|
|
|
|
%define skip_python2 1
|
2021-03-24 11:17:53 +01:00
|
|
|
# mpi4py depends on numpy, which is not available for python36
|
|
|
|
%define skip_python36 1
|
2020-12-10 11:49:09 +01:00
|
|
|
Name: python-pytest-mpi
|
2022-11-08 10:46:35 +01:00
|
|
|
Version: 0.6
|
2020-12-10 11:49:09 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: MPI plugin for pytest
|
|
|
|
License: BSD-3-Clause
|
|
|
|
URL: https://pytest-mpi.readthedocs.io
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-mpi/pytest-mpi-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-pytest
|
2021-03-24 11:17:53 +01:00
|
|
|
Recommends: python-mpi4py
|
2020-12-10 11:49:09 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module mpi4py}
|
2021-09-28 15:58:54 +02:00
|
|
|
BuildRequires: %{mpiver}
|
2020-12-10 11:49:09 +01:00
|
|
|
BuildRequires: %{python_module pytest}
|
2021-12-27 23:53:57 +01:00
|
|
|
BuildRequires: %{python_module sybil >= 3}
|
2020-12-10 11:49:09 +01:00
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
mpi plugin for pytest to collect information from openmpi-based tests.
|
|
|
|
|
|
|
|
%prep
|
2021-12-27 23:53:57 +01:00
|
|
|
%autosetup -p1 -n pytest-mpi-%{version}
|
2020-12-10 11:49:09 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2021-09-28 15:58:54 +02:00
|
|
|
export PATH=${PATH}:%{_libdir}/mpi/gcc/%{mpiver}/bin
|
|
|
|
source %{_libdir}/mpi/gcc/%{mpiver}/bin/mpivars.sh
|
2022-11-08 11:22:20 +01:00
|
|
|
export OMPI_MCA_pml=ob1
|
2021-09-26 16:41:49 +02:00
|
|
|
%pytest -v -p pytester --runpytest=subprocess
|
2020-12-10 11:49:09 +01:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE.txt
|
|
|
|
%{python_sitelib}/%{modname}/
|
|
|
|
%{python_sitelib}/%{modname}-%{version}-py%{python_version}.egg-info/
|
|
|
|
|
|
|
|
%changelog
|