%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7} %{?!_without_python3_other:%global with_python3_other 0%{?_with_python3_other:1} || 0%{?rhel} == 7} %global srcname pytest-repeat Name: python-%{srcname} Version: 0.7.0 Release: 1%{?dist} Summary: A pytest plugin for repeating test execution License: MPLv2.0 URL: https://github.com/pytest-dev/%{srcname} Source0: https://github.com/pytest-dev/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz # Taken from upstream Patch0: %{srcname}-0.7.0-pytest-3.6.patch BuildArch: noarch %description pytest-repeat is a plugin for py.test that makes it easy to repeat a single test, or multiple tests, a specific number of times. %if 0%{?with_python3} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-pytest >= 2.8.7 BuildRequires: python%{python3_pkgversion}-setuptools_scm Requires: python%{python3_pkgversion}-pytest >= 2.8.7 %description -n python%{python3_pkgversion}-%{srcname} pytest-repeat is a plugin for py.test that makes it easy to repeat a single test, or multiple tests, a specific number of times. %endif # with_python3 %if 0%{?with_python3_other} %package -n python%{python3_other_pkgversion}-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python%{python3_other_pkgversion}-%{srcname}} BuildRequires: python%{python3_other_pkgversion}-devel BuildRequires: python%{python3_other_pkgversion}-pytest >= 2.8.7 BuildRequires: python%{python3_other_pkgversion}-setuptools_scm Requires: python%{python3_other_pkgversion}-pytest >= 2.8.7 %description -n python%{python3_other_pkgversion}-%{srcname} pytest-repeat is a plugin for py.test that makes it easy to repeat a single test, or multiple tests, a specific number of times. %endif # with_python3_other %prep %autosetup -N -n %{srcname}-%{version} %if 0%{?fedora} >= 30 # Applies when pytest >= 3.8 %patch0 -p1 %endif # fedora %build %if 0%{?with_python3} SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %py3_build %endif # with_python3 %if 0%{?with_python3_other} SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %py3_other_build %endif # with_python3_other %install %if 0%{?with_python3} SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %py3_install %endif # with_python3 %if 0%{?with_python3_other} SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %py3_other_install %endif # with_python3_other %check %if 0%{?with_python3} PYTHONPATH=%{buildroot}%{python3_sitelib} \ py.test-%{python3_version} test_repeat.py %endif # with_python3 %if 0%{?with_python3_other} PYTHONPATH=%{buildroot}%{python3_other_sitelib} \ py.test-%{python3_other_version} test_repeat.py %endif # with_python3_other %if 0%{?with_python3} %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc CHANGES.rst README.rst %{python3_sitelib}/pytest_repeat.py %{python3_sitelib}/__pycache__/pytest_repeat.cpython-* %{python3_sitelib}/pytest_repeat-%{version}-py%{python3_version}.egg-info/ %endif # with_python3 %if 0%{?with_python3_other} %files -n python%{python3_other_pkgversion}-%{srcname} %license LICENSE %doc CHANGES.rst README.rst %{python3_other_sitelib}/pytest_repeat.py %{python3_other_sitelib}/__pycache__/pytest_repeat.cpython-* %{python3_other_sitelib}/pytest_repeat-%{version}-py%{python3_other_version}.egg-info/ %endif # with_python3_other %changelog * Tue Feb 12 2019 Scott K Logan - 0.7.0-1 - Initial package