63bd397
%?python_enable_dependency_generator
63bd397
%global srcname pytest-mpi
63bd397
63bd397
Name:           python-%{srcname}
b9a1e72
Version:        0.6
2e402e4
Release:        3%{?dist}
63bd397
Summary:        Pytest plugin for running tests under MPI
63bd397
63bd397
License:        BSD
63bd397
URL:            https://github.com/aragilar/pytest-mpi
63bd397
Source0:        https://github.com/aragilar/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
63bd397
63bd397
BuildArch:      noarch
63bd397
63bd397
%description
63bd397
pytest_mpi is a plugin for pytest providing some useful tools when running
63bd397
tests under MPI, and testing MPI-related code.
63bd397
63bd397
63bd397
%package -n python%{python3_pkgversion}-%{srcname}
63bd397
Summary:        Pytest plugin for running tests under MPI
63bd397
BuildRequires:  python%{python3_pkgversion}-devel
63bd397
BuildRequires:  python%{python3_pkgversion}-setuptools
63bd397
BuildRequires:  python%{python3_pkgversion}-pytest
d6b4a4e
BuildRequires:  python%{python3_pkgversion}-sybil >= 3.0
63bd397
BuildRequires:  mpich-devel
63bd397
BuildRequires:  python%{python3_pkgversion}-mpi4py-mpich
63bd397
BuildRequires:  openmpi-devel
63bd397
BuildRequires:  python%{python3_pkgversion}-mpi4py-openmpi
63bd397
63bd397
%description -n python%{python3_pkgversion}-%{srcname}
63bd397
pytest_mpi is a plugin for pytest providing some useful tools when running
63bd397
tests under MPI, and testing MPI-related code.
63bd397
63bd397
63bd397
%prep
63bd397
%autosetup -p1 -n %{srcname}-%{version}
63bd397
63bd397
63bd397
%build
63bd397
%py3_build
63bd397
63bd397
63bd397
%install
63bd397
%py3_install
63bd397
63bd397
63bd397
%check
2ab63e3
module load mpi/mpich-%{_host_cpu}
63bd397
export PYTHONPATH=%{buildroot}%{python3_sitelib}:$MPI_PYTHON3_SITEARCH
63bd397
py.test-%{python3_version} -p pytester --runpytest=subprocess -vv
2ab63e3
module unload mpi/mpich-%{_host_cpu}
2ab63e3
module load mpi/openmpi-%{_host_cpu}
b3fbaac
export OMPI_MCA_rmaps_base_oversubscribe=1
63bd397
export PYTHONPATH=%{buildroot}%{python3_sitelib}:$MPI_PYTHON3_SITEARCH
63bd397
py.test-%{python3_version} -p pytester --runpytest=subprocess -vv
2ab63e3
module unload mpi/openmpi-%{_host_cpu}
63bd397
63bd397
63bd397
%files -n python%{python3_pkgversion}-%{srcname}
63bd397
%license LICENSE.txt
63bd397
%doc README.md
63bd397
%{python3_sitelib}/pytest_mpi/
63bd397
%{python3_sitelib}/pytest_mpi-*.egg-info/
63bd397
63bd397
63bd397
%changelog
2e402e4
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.6-3
2e402e4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
2e402e4
0799773
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 0.6-2
0799773
- Rebuilt for Python 3.11
0799773
b9a1e72
* Sat Mar 05 2022 Orion Poplawski <orion@nwra.com> - 0.6-1
b9a1e72
- Update to 0.6
b9a1e72
b019821
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-3
b019821
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
b019821
2feac00
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-2
2feac00
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2feac00
8ab2163
* Wed Jun 09 2021 Orion Poplawski <orion@nwra.com> - 0.5-1
8ab2163
- Update to 0.5
8ab2163
d2e1f33
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 0.4-5
d2e1f33
- Rebuilt for Python 3.10
d2e1f33
b3fbaac
* Sat Jan 30 2021 Orion Poplawski <orion@nwra.com> - 0.4-4
b3fbaac
- Set OMPI_MCA_rmaps_base_oversubscribe=1 for openmpi tests (bz#1900524)
b3fbaac
a60484b
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-3
a60484b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a60484b
63bd397
* Sun Nov  1 2020 Orion Poplawski <orion@nwra.com> - 0.4-2
63bd397
- Change URL
63bd397
- Fix permissions
63bd397
63bd397
* Sun Oct 11 2020 Orion Poplawski <orion@nwra.com> - 0.4-1
63bd397
- Initial package