]> git.pld-linux.org Git - packages/python-pytest-cov.git/blame - python-pytest-cov.spec
rebuild with python 3.10
[packages/python-pytest-cov.git] / python-pytest-cov.spec
CommitLineData
aaf27adc
JB
1#
2# Conditional build:
fa29ddd7 3%bcond_without doc # Sphinx documentation
2b332d96 4%bcond_with tests # py.test tests [sensitive to coverage and pytest output, few tests fail for me]
fa29ddd7 5%bcond_with tests_py2 # Python 2 py.test tests [require some modules sources + the above]
2b332d96
JB
6%bcond_without python2 # CPython 2.x module
7%bcond_without python3 # CPython 3.x module
aaf27adc
JB
8
9Summary: pytest plugin for measuring coverage
10Summary(pl.UTF-8): Wtyczka pytest do mierzenia pokrycia
11Name: python-pytest-cov
9da1806d
JB
12# keep 2.x here for python2 support; >=2.11,<3 requires updating coverage to >=5.2.1
13Version: 2.10.1
32652b40 14Release: 2
aaf27adc
JB
15License: MIT
16Group: Libraries/Python
2b332d96 17#Source0Download: https://pypi.org/simple/pytest-cov/
aaf27adc 18Source0: https://files.pythonhosted.org/packages/source/p/pytest-cov/pytest-cov-%{version}.tar.gz
9da1806d 19# Source0-md5: 13e17f0b4f263a04fb1fadde7ebe2fbb
aaf27adc
JB
20URL: https://github.com/pytest-dev/pytest-cov
21%if %{with python2}
2b332d96 22BuildRequires: python-modules >= 1:2.7
aaf27adc 23BuildRequires: python-setuptools
fa29ddd7 24%if %{with tests_py2}
826fbf4b 25BuildRequires: python-coverage >= 4.5.4
2b332d96 26BuildRequires: python-fields
826fbf4b 27BuildRequires: python-process_tests >= 2.0.2
2b332d96 28BuildRequires: python-py
826fbf4b 29BuildRequires: python-pytest >= 3.10.1
2b332d96
JB
30BuildRequires: python-pytest-xdist >= 1.23.0
31BuildRequires: python-six
aaf27adc
JB
32BuildRequires: python-virtualenv
33%endif
34%endif
35%if %{with python3}
2b332d96 36BuildRequires: python3-modules >= 1:3.4
aaf27adc
JB
37BuildRequires: python3-setuptools
38%if %{with tests}
826fbf4b 39BuildRequires: python3-coverage >= 4.5.4
2b332d96 40BuildRequires: python3-fields
826fbf4b 41BuildRequires: python3-process_tests >= 2.0.2
2b332d96 42BuildRequires: python3-py
826fbf4b 43BuildRequires: python3-pytest >= 3.10.1
2b332d96
JB
44BuildRequires: python3-pytest-xdist >= 1.23.0
45BuildRequires: python3-six
aaf27adc
JB
46BuildRequires: python3-virtualenv
47%endif
48%endif
49BuildRequires: rpm-pythonprov
50BuildRequires: rpmbuild(macros) >= 1.714
51%if %{with doc}
52BuildRequires: sphinx-pdg
53BuildRequires: python3-sphinx_py3doc_enhanced_theme
54%endif
2b332d96 55Requires: python-modules >= 1:2.7
aaf27adc
JB
56BuildArch: noarch
57BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59%description
60This plugin produces coverage reports. It supports centralised testing
61and distributed testing in both load and each modes. It also supports
62coverage of subprocesses.
63
64%description -l pl.UTF-8
65Ta wtyczka tworzy raporty pokrycia. Obsługuje testowanie
66zcentraliwowane i rozproszone, zarówno w trybie "load", jak i "each".
67Obsługuje także pokrycie podprocesów.
68
69%package -n python3-pytest-cov
70Summary: pytest plugin for measuring coverage
71Summary(pl.UTF-8): Wtyczka pytest do mierzenia pokrycia
72Group: Libraries/Python
2b332d96 73Requires: python3-modules >= 1:3.4
aaf27adc
JB
74
75%description -n python3-pytest-cov
76This plugin produces coverage reports. It supports centralised testing
77and distributed testing in both load and each modes. It also supports
78coverage of subprocesses.
79
80%description -n python3-pytest-cov -l pl.UTF-8
81Ta wtyczka tworzy raporty pokrycia. Obsługuje testowanie
82zcentraliwowane i rozproszone, zarówno w trybie "load", jak i "each".
83Obsługuje także pokrycie podprocesów.
84
85%package apidocs
86Summary: Documentation for pytest-cov module
87Summary(pl.UTF-8): Dokumentacja do modułu pytest-cov
88Group: Documentation
89
90%description apidocs
91Documentation for pytest-cov module.
92
93%description apidocs -l pl.UTF-8
94Dokumentacja do modułu pytest-cov.
95
96%prep
97%setup -q -n pytest-cov-%{version}
98
99%build
100%if %{with python2}
101%py_build
102
fa29ddd7 103%if %{with tests_py2}
2b332d96
JB
104PYTHONPATH=$(pwd)/src:$(pwd)/tests \
105XPYTEST_PLUGINS=pytest_cov.plugin \
106%{__python} -m pytest tests
aaf27adc
JB
107%endif
108%endif
109
110%if %{with python3}
111%py3_build
112
113%if %{with tests}
2b332d96
JB
114PYTHONPATH=$(pwd)/src:$(pwd)/tests \
115XPYTEST_PLUGINS=pytest_cov.plugin \
116%{__python3} -m pytest tests
aaf27adc
JB
117%endif
118%endif
119
120%if %{with doc}
121cd docs
122sphinx-build -b html . _build/html
123%endif
124
125%install
126rm -rf $RPM_BUILD_ROOT
127
128%if %{with python2}
129%py_install
130
131%py_postclean
132%endif
133
134%if %{with python3}
135%py3_install
136%endif
137
138%clean
139rm -rf $RPM_BUILD_ROOT
140
141%if %{with python2}
142%files
143%defattr(644,root,root,755)
144%doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
145%{py_sitescriptdir}/pytest-cov.pth
146%{py_sitescriptdir}/pytest_cov
147%{py_sitescriptdir}/pytest_cov-%{version}-py*.egg-info
148%endif
149
150%if %{with python3}
151%files -n python3-pytest-cov
152%defattr(644,root,root,755)
153%doc AUTHORS.rst CHANGELOG.rst LICENSE README.rst
154%{py3_sitescriptdir}/pytest-cov.pth
155%{py3_sitescriptdir}/pytest_cov
156%{py3_sitescriptdir}/pytest_cov-%{version}-py*.egg-info
157%endif
158
159%if %{with doc}
160%files apidocs
161%defattr(644,root,root,755)
162%doc docs/_build/html/{_static,*.html,*.js}
163%endif
This page took 0.120976 seconds and 4 git commands to generate.