]> git.pld-linux.org Git - packages/python-coverage.git/blame_incremental - python-coverage.spec
rebuild with separate debuginfo build-ids
[packages/python-coverage.git] / python-coverage.spec
... / ...
CommitLineData
1# TODO: finish doc and tests (where dependencies available in PLD)
2#
3# Conditional build:
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
8
9%define module coverage
10Summary: Tool for measuring code coverage of Python programs
11Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie
12Name: python-%{module}
13Version: 4.5.4
14Release: 3
15License: Apache v2.0
16Group: Development/Languages/Python
17#Source0Download: https://pypi.org/simple/coverage/
18Source0: https://files.pythonhosted.org/packages/source/c/coverage/%{module}-%{version}.tar.gz
19# Source0-md5: c33cab2aed8780aac32880cb6c7616b7
20URL: http://coverage.readthedocs.org/
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.714
23%if %{with python2}
24BuildRequires: python-devel >= 1:2.6
25BuildRequires: python-setuptools >= 35.0.2
26%if %{with tests}
27BuildRequires: python-eventlet >= 0.22.0
28BuildRequires: python-flaky >= 3.4.0
29BuildRequires: python-gevent >= 1.2.2
30BuildRequires: python-greenlet >= 0.4.13
31BuildRequires: python-mock >= 2.0.0
32BuildRequires: python-pycontracts >= 1.8.2
33BuildRequires: python-pyparsing >= 2.4.0
34BuildRequires: python-pytest >= 3.2.5
35BuildRequires: python-pytest-xdist >= 1.20.1
36BuildRequires: python-unittest-mixins >= 1.4
37%endif
38%endif
39%if %{with python3}
40BuildRequires: python3-devel >= 1:3.3
41BuildRequires: python3-setuptools >= 35.0.2
42%if %{with tests}
43BuildRequires: python3-eventlet >= 0.22.0
44BuildRequires: python3-flaky >= 3.4.0
45BuildRequires: python3-greenlet >= 0.4.13
46BuildRequires: python3-pycontracts >= 1.8.2
47BuildRequires: python3-pyparsing >= 2.4.0
48BuildRequires: python3-pytest >= 3.2.5
49BuildRequires: python3-pytest-xdist >= 1.20.1
50BuildRequires: python3-unittest-mixins >= 1.4
51%endif
52%endif
53%if %{with doc}
54BuildRequires: python-doc8 >= 0.8.0
55BuildRequires: python-pyenchant >= 2.0.0
56BuildRequires: python-sphinxcontrib-spelling >= 4.0.1
57BuildRequires: python-sphinx_rtd_theme >= 0.2.4
58BuildRequires: sphinx-pdg-2 >= 1.6.6
59%endif
60Requires: python-modules >= 1:2.6
61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63%description
64Coverage.py is a tool for measuring code coverage of Python programs.
65It monitors your program, noting which parts of the code have been
66executed, then analyzes the source to identify code that could have
67been executed but was not.
68
69%description -l pl.UTF-8
70Coverage.py to narzędzie do szacowania pokrycia kodu programów w
71Pythonie. Monitoruje program, zapisując, które części kodu zostały
72wykonane, a następnie analizuje kod źródłowy w celu zidentyfikowania
73kodu, który mógłby zostać wykonany, ale nie był.
74
75%package -n python3-%{module}
76Summary: Tool for measuring code coverage of Python programs
77Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie
78Group: Development/Languages/Python
79Requires: python3-modules >= 1:3.3
80
81%description -n python3-%{module}
82Coverage.py is a tool for measuring code coverage of Python programs.
83It monitors your program, noting which parts of the code have been
84executed, then analyzes the source to identify code that could have
85been executed but was not.
86
87%description -n python3-%{module} -l pl.UTF-8
88Coverage.py to narzędzie do szacowania pokrycia kodu programów w
89Pythonie. Monitoruje program, zapisując, które części kodu zostały
90wykonane, a następnie analizuje kod źródłowy w celu zidentyfikowania
91kodu, który mógłby zostać wykonany, ale nie był.
92
93%prep
94%setup -q -n %{module}-%{version}
95
96%build
97%if %{with python2}
98%py_build
99
100%if %{with tests}
101%{__python} igor.py test_with_tracer py
102%{__python} igor.py test_with_tracer c
103%endif
104%endif
105
106%if %{with python3}
107%py3_build
108
109%if %{with tests}
110%{__python3} igor.py test_with_tracer py
111%{__python3} igor.py test_with_tracer c
112%endif
113%endif
114
115%if %{with doc}
116sphinx-build -b html -aqE doc doc/_build/html
117%endif
118
119%install
120rm -rf $RPM_BUILD_ROOT
121
122%if %{with python3}
123%py3_install
124%endif
125
126%if %{with python2}
127%py_install
128
129%py_postclean
130%endif
131
132%clean
133rm -rf $RPM_BUILD_ROOT
134
135%if %{with python2}
136%files
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
148%endif
149
150%if %{with python3}
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
163%endif
This page took 0.073294 seconds and 4 git commands to generate.