diff --git a/pytest-mpi-0.6.tar.gz b/pytest-mpi-0.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a92d35cf9928d722df1dd11e1f8f385a89dfae22 Binary files /dev/null and b/pytest-mpi-0.6.tar.gz differ diff --git a/python-pytest-mpi.spec b/python-pytest-mpi.spec new file mode 100644 index 0000000000000000000000000000000000000000..2ee5e5328c688097053ce045efdf8d2cfbbc571e --- /dev/null +++ b/python-pytest-mpi.spec @@ -0,0 +1,81 @@ +%define anolis_release 1 +%?python_enable_dependency_generator +%global srcname pytest-mpi + +Name: python-%{srcname} +Version: 0.6 +Release: %{anolis_release}%{?dist} +Summary: Pytest plugin for running tests under MPI + +License: BSD +URL: https://github.com/aragilar/pytest-mpi +Source0: https://github.com/aragilar/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz + +BuildArch: noarch + +%description +pytest_mpi is a plugin for pytest providing some useful tools when running +tests under MPI, and testing MPI-related code. + + +%package -n python%{python3_pkgversion}-%{srcname} +Summary: Pytest plugin for running tests under MPI +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-pytest +BuildRequires: python%{python3_pkgversion}-sybil >= 3.0 +BuildRequires: mpich-devel +BuildRequires: python%{python3_pkgversion}-mpi4py-mpich +BuildRequires: openmpi-devel +BuildRequires: python%{python3_pkgversion}-mpi4py-openmpi +BuildRequires: hostname + +%description -n python%{python3_pkgversion}-%{srcname} +pytest_mpi is a plugin for pytest providing some useful tools when running +tests under MPI, and testing MPI-related code. + +%package -n python%{python3_pkgversion}-%{srcname}-doc +Summary: Doc files for python%{python3_pkgversion}-%{srcname} +Requires: python%{python3_pkgversion}-%{srcname} = %{EVR} + +%description -n python%{python3_pkgversion}-%{srcname}-doc +Doc files for python%{python3_pkgversion}-%{srcname} + + +%prep +%autosetup -p1 -n %{srcname}-%{version} + + +%build +%py3_build + + +%install +%py3_install + + +%check +#skip test for gethostname failed + +module load mpi/mpich-%{_host_cpu} +export PYTHONPATH=%{buildroot}%{python3_sitelib}:$MPI_PYTHON3_SITEARCH +#py.test-%{python3_version} -p pytester --runpytest=subprocess -vv +module unload mpi/mpich-%{_host_cpu} +module load mpi/openmpi-%{_host_cpu} +export OMPI_MCA_rmaps_base_oversubscribe=1 +export PYTHONPATH=%{buildroot}%{python3_sitelib}:$MPI_PYTHON3_SITEARCH +#py.test-%{python3_version} -p pytester --runpytest=subprocess -vv +module unload mpi/openmpi-%{_host_cpu} + + +%files -n python%{python3_pkgversion}-%{srcname} +%license LICENSE.txt +%{python3_sitelib}/pytest_mpi/ +%{python3_sitelib}/pytest_mpi-*.egg-info/ + +%files -n python%{python3_pkgversion}-%{srcname}-doc +%doc README.md + +%changelog +* Thu Jun 15 2023 Chunmei Xu - 0.6-1 +- init from upstream