3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # py.test tests [sensitive to coverage and pytest output, hang for me]
5 %bcond_with tests_py2 # Python 2 py.test tests [require some modules sources + the above]
6 %bcond_without python2 # CPython 2.x module
7 %bcond_without python3 # CPython 3.x module
9 Summary: pytest plugin for measuring coverage
10 Summary(pl.UTF-8): Wtyczka pytest do mierzenia pokrycia
11 Name: python-pytest-cov
15 Group: Libraries/Python
16 #Source0Download: https://pypi.python.org/simple/pytest-cov
17 Source0: https://files.pythonhosted.org/packages/source/p/pytest-cov/pytest-cov-%{version}.tar.gz
18 # Source0-md5: 2fda09677d232acc99ec1b3c5831e33f
19 URL: https://github.com/pytest-dev/pytest-cov
21 BuildRequires: python-modules >= 1:2.6
22 BuildRequires: python-setuptools
24 BuildRequires: python-coverage >= 3.7.1
25 BuildRequires: python-helper
26 BuildRequires: python-process_tests >= 1.2.0
27 BuildRequires: python-pytest >= 2.6.0
28 BuildRequires: python-pytest-catchlog
29 BuildRequires: python-pytest-xdist >= 1.15.0
30 BuildRequires: python-virtualenv
34 BuildRequires: python3-modules >= 1:3.3
35 BuildRequires: python3-setuptools
37 BuildRequires: python3-coverage >= 3.7.1
38 BuildRequires: python3-helper
39 BuildRequires: python3-process_tests >= 1.2.0
40 BuildRequires: python3-pytest >= 2.6.0
41 BuildRequires: python3-pytest-catchlog
42 BuildRequires: python3-pytest-xdist >= 1.15.0
43 BuildRequires: python3-virtualenv
46 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.714
49 BuildRequires: sphinx-pdg
50 BuildRequires: python3-sphinx_py3doc_enhanced_theme
52 Requires: python-modules >= 1:2.6
54 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 This plugin produces coverage reports. It supports centralised testing
58 and distributed testing in both load and each modes. It also supports
59 coverage of subprocesses.
61 %description -l pl.UTF-8
62 Ta wtyczka tworzy raporty pokrycia. Obsługuje testowanie
63 zcentraliwowane i rozproszone, zarówno w trybie "load", jak i "each".
64 Obsługuje także pokrycie podprocesów.
66 %package -n python3-pytest-cov
67 Summary: pytest plugin for measuring coverage
68 Summary(pl.UTF-8): Wtyczka pytest do mierzenia pokrycia
69 Group: Libraries/Python
70 Requires: python3-modules >= 1:3.3
72 %description -n python3-pytest-cov
73 This plugin produces coverage reports. It supports centralised testing
74 and distributed testing in both load and each modes. It also supports
75 coverage of subprocesses.
77 %description -n python3-pytest-cov -l pl.UTF-8
78 Ta wtyczka tworzy raporty pokrycia. Obsługuje testowanie
79 zcentraliwowane i rozproszone, zarówno w trybie "load", jak i "each".
80 Obsługuje także pokrycie podprocesów.
83 Summary: Documentation for pytest-cov module
84 Summary(pl.UTF-8): Dokumentacja do modułu pytest-cov
88 Documentation for pytest-cov module.
90 %description apidocs -l pl.UTF-8
91 Dokumentacja do modułu pytest-cov.
94 %setup -q -n pytest-cov-%{version}
100 %if %{with tests_py2}
101 PYTHONPATH=$(pwd)/build-2/lib PYTEST_PLUGINS=pytest_cov.plugin %{__python} -m pytest
109 PYTHONPATH=$(pwd)/build-3/lib PYTEST_PLUGINS=pytest_cov.plugin %{__python3} -m pytest
115 sphinx-build -b html . _build/html
119 rm -rf $RPM_BUILD_ROOT
132 rm -rf $RPM_BUILD_ROOT
136 %defattr(644,root,root,755)
137 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
138 %{py_sitescriptdir}/pytest-cov.pth
139 %{py_sitescriptdir}/pytest_cov
140 %{py_sitescriptdir}/pytest_cov-%{version}-py*.egg-info
144 %files -n python3-pytest-cov
145 %defattr(644,root,root,755)
146 %doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
147 %{py3_sitescriptdir}/pytest-cov.pth
148 %{py3_sitescriptdir}/pytest_cov
149 %{py3_sitescriptdir}/pytest_cov-%{version}-py*.egg-info
154 %defattr(644,root,root,755)
155 %doc docs/_build/html/{_static,*.html,*.js}