Ship python2-pytest-cov

epel8
Orion Poplawski 8 years ago
parent 0f74c0a15a
commit 5dc1b67987

@ -1,41 +1,42 @@
%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 %global srcname pytest-cov
Name: python-%{srcname} Name: python-%{srcname}
Version: 2.5.1 Version: 2.5.1
Release: 2%{?dist} Release: 3%{?dist}
Summary: Pytest plugin for coverage reporting Summary: Pytest plugin for coverage reporting
License: MIT License: MIT
URL: https://pypi.python.org/pypi/%{srcname} URL: https://pypi.python.org/pypi/%{srcname}
Source0: https://github.com/pytest-dev/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz Source0: https://github.com/pytest-dev/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch 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 %description
Py.test plugin for coverage reporting with support for both centralised and Py.test plugin for coverage reporting with support for both centralised and
distributed testing, including subprocesses and multiprocessing for Python.
%package -n python2-%{srcname}
Summary: Pytest plugin for coverage reporting
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-pytest
BuildRequires: python2-coverage >= 3.7.1
# For tests
# Not packaged
# BuildRequires: python2-fields
BuildRequires: python2-process-tests
BuildRequires: python2-six
BuildRequires: python2-virtualenv
Requires: python2-pytest
Requires: python2-coverage >= 3.7.1
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
Py.test plugin for coverage reporting with support for both centralised and
distributed testing, including subprocesses and multiprocessing for Python 2. distributed testing, including subprocesses and multiprocessing for Python 2.
%if 0%{?with_python3}
%package -n python%{python3_pkgversion}-%{srcname} %package -n python%{python3_pkgversion}-%{srcname}
Summary: Pytest plugin for coverage reporting Summary: Pytest plugin for coverage reporting
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
@ -43,15 +44,18 @@ BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-pytest BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-coverage >= 3.7.1 BuildRequires: python%{python3_pkgversion}-coverage >= 3.7.1
# For tests # For tests
# Not packaged
# BuildRequires: python%{python3_pkgversion}-fields
BuildRequires: python%{python3_pkgversion}-process-tests BuildRequires: python%{python3_pkgversion}-process-tests
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-virtualenv BuildRequires: python%{python3_pkgversion}-virtualenv
Requires: python%{python3_pkgversion}-pytest Requires: python%{python3_pkgversion}-pytest
Requires: python%{python3_pkgversion}-coverage >= 3.7.1 Requires: python%{python3_pkgversion}-coverage >= 3.7.1
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python%{python3_pkgversion}-%{srcname} %description -n python%{python3_pkgversion}-%{srcname}
Py.test plugin for coverage reporting with support for both centralised and Py.test plugin for coverage reporting with support for both centralised and
distributed testing, including subprocesses and multiprocessing for Python 3. distributed testing, including subprocesses and multiprocessing for Python 3.
%endif # with_python3
%prep %prep
@ -61,41 +65,35 @@ rm -rf *.egg-info
%build %build
%py2_build %py2_build
%if 0%{?with_python3}
%py3_build %py3_build
%endif # with_python3
%install %install
%if 0%{?with_python3}
%py3_install %py3_install
%endif # with_python3
%py2_install %py2_install
%check %check
# Tests fail https://github.com/pytest-dev/pytest-cov/issues/90 # Tests fail https://github.com/pytest-dev/pytest-cov/issues/90
PYTHONPATH=%{buildroot}%{python2_sitelib}:$PWD/tests py.test-%{python2_version} -vv || : 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 || : PYTHONPATH=%{buildroot}%{python3_sitelib}:$PWD/tests py.test-%{python3_version} -vv || :
%endif # with_python3
%files %files -n python2-%{srcname}
%license LICENSE %license LICENSE
%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst %doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst
%{python2_sitelib}/* %{python2_sitelib}/*
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-%{srcname} %files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE %license LICENSE
%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst %doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst
%{python3_sitelib}/* %{python3_sitelib}/*
%endif # with_python3
%changelog %changelog
* Wed Aug 9 2017 Orion Poplawski <orion@cora.nwra.com> - 2.5.1-3
- Ship python2-pytest-cov
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2 * Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

Loading…
Cancel
Save