You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
3.7 KiB
129 lines
3.7 KiB
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
%else
|
|
%global with_python3 1
|
|
%endif
|
|
|
|
%global srcname pytest-cov
|
|
|
|
Name: python-%{srcname}
|
|
Version: 2.2.0
|
|
Release: 3%{?dist}
|
|
Summary: Pytest plugin for coverage reporting
|
|
|
|
License: MIT
|
|
URL: https://pypi.python.org/pypi/%{srcname}
|
|
Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz
|
|
# Skip xdist tests, not yet packaged
|
|
Patch0: python-pytest-cov-xdist.patch
|
|
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: python2-devel
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: pytest
|
|
BuildRequires: python-coverage >= 3.7.1
|
|
# For tests
|
|
BuildRequires: python-process-tests
|
|
BuildRequires: python-virtualenv
|
|
Requires: pytest
|
|
Requires: python-coverage >= 3.7.1
|
|
Provides: python2-%{srcname} = %{version}-%{release}
|
|
|
|
%description
|
|
Py.test plugin for coverage reporting with support for both centralised and
|
|
distributed testing, including subprocesses and multiprocessing for Python 2.
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
%package -n python3-%{srcname}
|
|
Summary: Pytest plugin for coverage reporting
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
BuildRequires: python3-pytest
|
|
BuildRequires: python3-coverage >= 3.7.1
|
|
# For tests
|
|
BuildRequires: python3-process-tests
|
|
BuildRequires: python3-virtualenv
|
|
Requires: python3-pytest
|
|
Requires: python3-coverage >= 3.7.1
|
|
|
|
%description -n python3-%{srcname}
|
|
Py.test plugin for coverage reporting with support for both centralised and
|
|
distributed testing, including subprocesses and multiprocessing for Python 3.
|
|
%endif # with_python3
|
|
|
|
|
|
%prep
|
|
%setup -q -n %{srcname}-%{version}
|
|
%patch0 -p1 -b .xdist
|
|
rm -rf *.egg-info
|
|
|
|
|
|
%build
|
|
%py2_build
|
|
%if 0%{?with_python3}
|
|
%py3_build
|
|
%endif # with_python3
|
|
|
|
|
|
%install
|
|
%if 0%{?with_python3}
|
|
%py3_install
|
|
%endif # with_python3
|
|
%py2_install
|
|
|
|
|
|
%check
|
|
PYTHONPATH=%{buildroot}%{python2_sitelib}:$PWD/tests py.test-%{python2_version} -vv
|
|
|
|
%if 0%{?with_python3}
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib}:$PWD/tests py.test-%{python3_version} -vv
|
|
%endif # with_python3
|
|
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst
|
|
%{python2_sitelib}/*
|
|
|
|
%if 0%{?with_python3}
|
|
%files -n python3-%{srcname}
|
|
%license LICENSE
|
|
%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst
|
|
%{python3_sitelib}/*
|
|
%endif # with_python3
|
|
|
|
|
|
%changelog
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
* Fri Nov 06 2015 Robert Kuska <rkuska@redhat.com> - 2.2.0-2
|
|
- Rebuilt for Python3.5 rebuild
|
|
- Skip tests for a python3 rebuild as it seems to be env failure
|
|
|
|
* Mon Oct 5 2015 Orion Poplawski <orion@cora.nwra.com> - 2.2.0-1
|
|
- Update to 2.2.0
|
|
|
|
* Mon Sep 14 2015 Orion Poplawski <orion@cora.nwra.com> - 2.1.0-2
|
|
- Modernize spec
|
|
- Run tests properly, skipping xdist tests for now
|
|
|
|
* Mon Sep 14 2015 Tomas Tomecek <ttomecek@redhat.com> - 2.1.0-1
|
|
- upstream release 2.1.0
|
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-4
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Tue May 27 2014 Orion Poplawski <orion@cora.nwra.com> - 1.6-2
|
|
- Rebuild for Python 3.4
|
|
|
|
* Tue Feb 25 2014 Orion Poplawski <orion@cora.nwra.com> - 1.6-1
|
|
- Initial package
|