%global pypi_name pytest-testmon Name: python-%{pypi_name} Version: 0.8.2 Release: 1%{?dist} Summary: A py.test plug-in which executes only tests affected by recent changes License: MIT URL: http://testmon.org/ # This does not yet include tests # Source0: https://pypi.python.org/packages/source/p/%%{pypi_name}/%%{pypi_name}-%%{version}.tar.gz # Pull request already merged, release pending # So use GitHub archive instead Source0: https://github.com/tarpas/%{pypi_name}/archive/v%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python2-setuptools BuildRequires: python2-pytest BuildRequires: python2-coverage BuildRequires: python2-coverage_pth BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: python3-coverage BuildRequires: python3-coverage_pth %description This is a py.test plug-in which automatically selects and re- executes only tests affected by recent changes. %package -n python2-%{pypi_name} Summary: A py.test plug-in which executes only tests affected by recent changes %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python2-pytest >= 2.7.0 Requires: python2-pytest < 3 Requires: python2-coverage >= 4 Requires: python2-coverage_pth Requires: python2-setuptools %description -n python2-%{pypi_name} This is a py.test plug-in which automatically selects and re- executes only tests affected by recent changes. This a Python 2 version of the package. %package -n python3-%{pypi_name} Summary: A py.test plug-in which executes only tests affected by recent changes %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3-pytest >= 2.7.0 Requires: python3-pytest < 3 Requires: python3-coverage >= 4 Requires: python3-coverage_pth Requires: python3-setuptools %description -n python3-%{pypi_name} This is a py.test plug-in which automatically selects and re- executes only tests affected by recent changes. This a Python 3 version of the package. %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install %py2_install %py3_install %check # The testsuite calls py.test command from different directory, so this is neccessary to see tesmon export PYTHONPATH=$PWD py.test-3 py.test-2 %files -n python2-%{pypi_name} %license LICENSE %doc README.rst %{python2_sitelib}/testmon %{python2_sitelib}/pytest_testmon-%{version}-py?.?.egg-info %files -n python3-%{pypi_name} %license LICENSE %doc README.rst %{python3_sitelib}/testmon %{python3_sitelib}/pytest_testmon-%{version}-py?.?.egg-info %changelog * Wed Apr 13 2016 Miro Hrončok - 0.8.2-1 - New upstream release (removes the need for old patch) - Be consistent with Requires and BRs - Add coverage_pth to Requires - Run tests and BR on dependencies - Use GitHub archive to get tests - export PYTHONPATH before running tests - Add LICENSE file to %%license * Fri Mar 11 2016 Miro Hrončok - 0.8.1-1 - Initial package