1 # TODO: finish doc and tests (where dependencies available in PLD)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
6 %bcond_with doc # Sphinx documentation
7 %bcond_with tests # unit tests
9 %define module coverage
10 Summary: Tool for measuring code coverage of Python programs
11 Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie
12 Name: python-%{module}
16 Group: Development/Languages/Python
17 #Source0Download: https://pypi.org/simple/coverage/
18 Source0: https://files.pythonhosted.org/packages/source/c/coverage/%{module}-%{version}.tar.gz
19 # Source0-md5: c33cab2aed8780aac32880cb6c7616b7
20 URL: http://coverage.readthedocs.org/
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.714
24 BuildRequires: python-devel >= 1:2.6
25 BuildRequires: python-setuptools >= 1:35.0.2
27 BuildRequires: python-eventlet >= 0.22.0
28 BuildRequires: python-flaky >= 3.4.0
29 BuildRequires: python-gevent >= 1.2.2
30 BuildRequires: python-greenlet >= 0.4.13
31 BuildRequires: python-mock >= 2.0.0
32 BuildRequires: python-pycontracts >= 1.8.2
33 BuildRequires: python-pyparsing >= 2.4.0
34 BuildRequires: python-pytest >= 3.2.5
35 BuildRequires: python-pytest-xdist >= 1.20.1
36 BuildRequires: python-unittest-mixins >= 1.4
40 BuildRequires: python3-devel >= 1:3.3
41 BuildRequires: python3-setuptools >= 1:35.0.2
43 BuildRequires: python3-eventlet >= 0.22.0
44 BuildRequires: python3-flaky >= 3.4.0
45 BuildRequires: python3-greenlet >= 0.4.13
46 BuildRequires: python3-pycontracts >= 1.8.2
47 BuildRequires: python3-pyparsing >= 2.4.0
48 BuildRequires: python3-pytest >= 3.2.5
49 BuildRequires: python3-pytest-xdist >= 1.20.1
50 BuildRequires: python3-unittest-mixins >= 1.4
54 BuildRequires: python-doc8 >= 0.8.0
55 BuildRequires: python-pyenchant >= 2.0.0
56 BuildRequires: python-sphinxcontrib-spelling >= 4.0.1
57 BuildRequires: python-sphinx_rtd_theme >= 0.2.4
58 BuildRequires: sphinx-pdg-2 >= 1.6.6
60 Requires: python-modules >= 1:2.6
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 Coverage.py is a tool for measuring code coverage of Python programs.
65 It monitors your program, noting which parts of the code have been
66 executed, then analyzes the source to identify code that could have
67 been executed but was not.
69 %description -l pl.UTF-8
70 Coverage.py to narzędzie do szacowania pokrycia kodu programów w
71 Pythonie. Monitoruje program, zapisując, które części kodu zostały
72 wykonane, a następnie analizuje kod źródłowy w celu zidentyfikowania
73 kodu, który mógłby zostać wykonany, ale nie był.
75 %package -n python3-%{module}
76 Summary: Tool for measuring code coverage of Python programs
77 Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie
78 Group: Development/Languages/Python
79 Requires: python3-modules >= 1:3.3
81 %description -n python3-%{module}
82 Coverage.py is a tool for measuring code coverage of Python programs.
83 It monitors your program, noting which parts of the code have been
84 executed, then analyzes the source to identify code that could have
85 been executed but was not.
87 %description -n python3-%{module} -l pl.UTF-8
88 Coverage.py to narzędzie do szacowania pokrycia kodu programów w
89 Pythonie. Monitoruje program, zapisując, które części kodu zostały
90 wykonane, a następnie analizuje kod źródłowy w celu zidentyfikowania
91 kodu, który mógłby zostać wykonany, ale nie był.
94 %setup -q -n %{module}-%{version}
101 %{__python} igor.py test_with_tracer py
102 %{__python} igor.py test_with_tracer c
110 %{__python3} igor.py test_with_tracer py
111 %{__python3} igor.py test_with_tracer c
116 sphinx-build -b html -aqE doc doc/_build/html
120 rm -rf $RPM_BUILD_ROOT
133 rm -rf $RPM_BUILD_ROOT
137 %defattr(644,root,root,755)
138 %doc CHANGES.rst CONTRIBUTORS.txt NOTICE.txt README.rst TODO.txt
139 %attr(755,root,root) %{_bindir}/coverage
140 %attr(755,root,root) %{_bindir}/coverage2
141 %attr(755,root,root) %{_bindir}/coverage-%{py_ver}
142 %dir %{py_sitedir}/coverage
143 %{py_sitedir}/coverage/*.py[co]
144 %attr(755,root,root) %{py_sitedir}/coverage/tracer.so
145 %{py_sitedir}/coverage/fullcoverage
146 %{py_sitedir}/coverage/htmlfiles
147 %{py_sitedir}/coverage-%{version}-py*.egg-info
151 %files -n python3-%{module}
152 %defattr(644,root,root,755)
153 %doc CHANGES.rst CONTRIBUTORS.txt NOTICE.txt README.rst TODO.txt
154 %attr(755,root,root) %{_bindir}/coverage3
155 %attr(755,root,root) %{_bindir}/coverage-%{py3_ver}
156 %dir %{py3_sitedir}/coverage
157 %attr(755,root,root) %{py3_sitedir}/coverage/tracer.cpython-*.so
158 %{py3_sitedir}/coverage/*.py
159 %{py3_sitedir}/coverage/__pycache__
160 %{py3_sitedir}/coverage/fullcoverage
161 %{py3_sitedir}/coverage/htmlfiles
162 %{py3_sitedir}/coverage-%{version}-py*.egg-info