df59018
%if 0%{?rhel} && 0%{?rhel} <= 7
d4e055e
%{!?__python2: %global __python2 /usr/bin/python2}
d4e055e
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
d4e055e
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
d4e055e
%else
d4e055e
%global with_python3 1
d4e055e
%endif
d4e055e
d4e055e
%global srcname pytest-cov
d4e055e
d4e055e
Name:           python-%{srcname}
Orion Poplawski d8c4c1f
Version:        2.5.1
Orion Poplawski 1eb27e6
Release:        1%{?dist}
d4e055e
Summary:        Pytest plugin for coverage reporting
d4e055e
d4e055e
License:        MIT
d4e055e
URL:            https://pypi.python.org/pypi/%{srcname}
Orion Poplawski d825a64
Source0:        https://github.com/pytest-dev/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
Orion Poplawski 7e71bb9
d4e055e
d4e055e
BuildArch:      noarch
d4e055e
BuildRequires:  python2-devel
d4e055e
BuildRequires:  python-setuptools
d4e055e
BuildRequires:  pytest
Orion Poplawski 7e71bb9
BuildRequires:  python-coverage >= 3.7.1
Orion Poplawski 7e71bb9
# For tests
Orion Poplawski 7e71bb9
BuildRequires:  python-process-tests
Orion Poplawski 7e71bb9
BuildRequires:  python-virtualenv
d4e055e
Requires:       pytest
Orion Poplawski 7e71bb9
Requires:       python-coverage >= 3.7.1
Orion Poplawski 7e71bb9
Provides:       python2-%{srcname} = %{version}-%{release}
d4e055e
d4e055e
%description
d4e055e
Py.test plugin for coverage reporting with support for both centralised and
d4e055e
distributed testing, including subprocesses and multiprocessing for Python 2.
d4e055e
d4e055e
d4e055e
%if 0%{?with_python3}
Orion Poplawski a5aad57
%package -n python%{python3_pkgversion}-%{srcname}
d4e055e
Summary:        Pytest plugin for coverage reporting
Orion Poplawski a5aad57
BuildRequires:  python%{python3_pkgversion}-devel
Orion Poplawski a5aad57
BuildRequires:  python%{python3_pkgversion}-setuptools
Orion Poplawski a5aad57
BuildRequires:  python%{python3_pkgversion}-pytest
Orion Poplawski a5aad57
BuildRequires:  python%{python3_pkgversion}-coverage >= 3.7.1
Orion Poplawski 7e71bb9
# For tests
Orion Poplawski a5aad57
BuildRequires:  python%{python3_pkgversion}-process-tests
Orion Poplawski a5aad57
BuildRequires:  python%{python3_pkgversion}-virtualenv
Orion Poplawski a5aad57
Requires:       python%{python3_pkgversion}-pytest
Orion Poplawski a5aad57
Requires:       python%{python3_pkgversion}-coverage >= 3.7.1
d4e055e
Orion Poplawski a5aad57
%description -n python%{python3_pkgversion}-%{srcname}
d4e055e
Py.test plugin for coverage reporting with support for both centralised and
d4e055e
distributed testing, including subprocesses and multiprocessing for Python 3.
d4e055e
%endif # with_python3
d4e055e
d4e055e
d4e055e
%prep
d4e055e
%setup -q -n %{srcname}-%{version}
d4e055e
rm -rf *.egg-info
d4e055e
d4e055e
d4e055e
%build
Orion Poplawski 7e71bb9
%py2_build
d4e055e
%if 0%{?with_python3}
Orion Poplawski 7e71bb9
%py3_build
d4e055e
%endif # with_python3
d4e055e
d4e055e
d4e055e
%install
d4e055e
%if 0%{?with_python3}
Orion Poplawski 7e71bb9
%py3_install
d4e055e
%endif # with_python3
Orion Poplawski 7e71bb9
%py2_install
d4e055e
d4e055e
Robert Kuska 020dbd3
%check
Orion Poplawski 06e3c0f
# Tests fail https://github.com/pytest-dev/pytest-cov/issues/90
Orion Poplawski 06e3c0f
PYTHONPATH=%{buildroot}%{python2_sitelib}:$PWD/tests py.test-%{python2_version} -vv || :
Robert Kuska 020dbd3
Robert Kuska 020dbd3
%if 0%{?with_python3}
Orion Poplawski 06e3c0f
PYTHONPATH=%{buildroot}%{python3_sitelib}:$PWD/tests py.test-%{python3_version} -vv || :
Robert Kuska 020dbd3
%endif # with_python3
d4e055e
d4e055e
d4e055e
%files
Orion Poplawski 7e71bb9
%license LICENSE
Orion Poplawski 7e71bb9
%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst
d4e055e
%{python2_sitelib}/*
d4e055e
d4e055e
%if 0%{?with_python3}
Orion Poplawski a5aad57
%files -n python%{python3_pkgversion}-%{srcname}
Orion Poplawski 7e71bb9
%license LICENSE
Orion Poplawski 7e71bb9
%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst
d4e055e
%{python3_sitelib}/*
d4e055e
%endif # with_python3
d4e055e
d4e055e
d4e055e
%changelog
Orion Poplawski d8c4c1f
* Fri May 12 2017 Orion Poplawski <orion@cora.nwra.com> - 2.5.1-1
Orion Poplawski d8c4c1f
- Update to 2.5.1
Orion Poplawski d8c4c1f
Orion Poplawski 1eb27e6
* Wed May 10 2017 Orion Poplawski <orion@cora.nwra.com> - 2.5.0-1
Orion Poplawski 1eb27e6
- Update to 2.5.0
Orion Poplawski 1eb27e6
e8ef211
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-3
e8ef211
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e8ef211
c3394f1
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 2.4.0-2
c3394f1
- Rebuild for Python 3.6
c3394f1
Orion Poplawski a5aad57
* Mon Oct 10 2016 Orion Poplawski <orion@cora.nwra.com> - 2.4.0-1
Orion Poplawski a5aad57
- Update to 2.4.0
Orion Poplawski a5aad57
b9f4120
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-2
b9f4120
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
b9f4120
Orion Poplawski d825a64
* Thu Jul 7 2016 Orion Poplawski <orion@cora.nwra.com> - 2.3.0-1
Orion Poplawski d825a64
- Update to 2.3.0
Orion Poplawski d825a64
Orion Poplawski 06e3c0f
* Mon May 23 2016 Orion Poplawski <orion@cora.nwra.com> - 2.2.1-1
Orion Poplawski 06e3c0f
- Ignore failing tests
Orion Poplawski 06e3c0f
Orion Poplawski 1730544
* Sat Feb 13 2016 Orion Poplawski <orion@cora.nwra.com> - 2.2.1-1
Orion Poplawski 1730544
- Update to 2.2.1
Orion Poplawski 1730544
9236edf
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-3
9236edf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9236edf
Robert Kuska fa3fb13
* Fri Nov 06 2015 Robert Kuska <rkuska@redhat.com> - 2.2.0-2
Robert Kuska fa3fb13
- Rebuilt for Python3.5 rebuild
Robert Kuska fa3fb13
- Skip tests for a python3 rebuild as it seems to be env failure
Robert Kuska fa3fb13
Orion Poplawski a180007
* Mon Oct 5 2015 Orion Poplawski <orion@cora.nwra.com> - 2.2.0-1
Orion Poplawski a180007
- Update to 2.2.0
Orion Poplawski a180007
Orion Poplawski 7e71bb9
* Mon Sep 14 2015 Orion Poplawski <orion@cora.nwra.com> - 2.1.0-2
Orion Poplawski 7e71bb9
- Modernize spec
Orion Poplawski 7e71bb9
- Run tests properly, skipping xdist tests for now
Orion Poplawski 7e71bb9
9020e26
* Mon Sep 14 2015 Tomas Tomecek <ttomecek@redhat.com> - 2.1.0-1
9020e26
- upstream release 2.1.0
9020e26
c92eb5a
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
c92eb5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c92eb5a
3232324
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-3
3232324
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3232324
05be5ac
* Tue May 27 2014 Orion Poplawski <orion@cora.nwra.com> - 1.6-2
05be5ac
- Rebuild for Python 3.4
05be5ac
d4e055e
* Tue Feb 25 2014 Orion Poplawski <orion@cora.nwra.com> - 1.6-1
d4e055e
- Initial package