]> git.pld-linux.org Git - packages/python-coverage.git/blame - python-coverage.spec
rebuild with separate debuginfo build-ids
[packages/python-coverage.git] / python-coverage.spec
CommitLineData
3c63b87a 1# TODO: finish doc and tests (where dependencies available in PLD)
89c96ed0
JB
2#
3# Conditional build:
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
3c63b87a
JB
6%bcond_with doc # Sphinx documentation
7%bcond_with tests # unit tests
89c96ed0 8
d1b18853 9%define module coverage
10Summary: Tool for measuring code coverage of Python programs
89c96ed0 11Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie
d1b18853 12Name: python-%{module}
5420a90b 13Version: 4.5.4
f4ea828c 14Release: 3
305b66d8 15License: Apache v2.0
d1b18853 16Group: Development/Languages/Python
3c63b87a 17#Source0Download: https://pypi.org/simple/coverage/
564086f1 18Source0: https://files.pythonhosted.org/packages/source/c/coverage/%{module}-%{version}.tar.gz
5420a90b 19# Source0-md5: c33cab2aed8780aac32880cb6c7616b7
89c96ed0
JB
20URL: http://coverage.readthedocs.org/
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.714
23%if %{with python2}
305b66d8 24BuildRequires: python-devel >= 1:2.6
330a52d3 25BuildRequires: python-setuptools >= 35.0.2
3c63b87a 26%if %{with tests}
5420a90b 27BuildRequires: python-eventlet >= 0.22.0
3c63b87a 28BuildRequires: python-flaky >= 3.4.0
5420a90b
JB
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
3c63b87a
JB
34BuildRequires: python-pytest >= 3.2.5
35BuildRequires: python-pytest-xdist >= 1.20.1
5420a90b 36BuildRequires: python-unittest-mixins >= 1.4
3c63b87a 37%endif
89c96ed0
JB
38%endif
39%if %{with python3}
305b66d8 40BuildRequires: python3-devel >= 1:3.3
330a52d3 41BuildRequires: python3-setuptools >= 35.0.2
3c63b87a 42%if %{with tests}
5420a90b
JB
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
3c63b87a
JB
51%endif
52%endif
53%if %{with doc}
5420a90b 54BuildRequires: python-doc8 >= 0.8.0
3c63b87a
JB
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
89c96ed0 59%endif
305b66d8 60Requires: python-modules >= 1:2.6
d1b18853 61BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63%description
61734f13 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.
d1b18853 68
89c96ed0
JB
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
4af080a0 75%package -n python3-%{module}
76Summary: Tool for measuring code coverage of Python programs
89c96ed0 77Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie
4af080a0 78Group: Development/Languages/Python
305b66d8 79Requires: python3-modules >= 1:3.3
4af080a0 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
89c96ed0
JB
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
d1b18853 93%prep
94%setup -q -n %{module}-%{version}
95
96%build
89c96ed0
JB
97%if %{with python2}
98%py_build
3c63b87a
JB
99
100%if %{with tests}
101%{__python} igor.py test_with_tracer py
102%{__python} igor.py test_with_tracer c
103%endif
89c96ed0
JB
104%endif
105
106%if %{with python3}
107%py3_build
3c63b87a
JB
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
89c96ed0 117%endif
d1b18853 118
119%install
120rm -rf $RPM_BUILD_ROOT
4af080a0 121
564086f1
JB
122%if %{with python3}
123%py3_install
124%endif
125
89c96ed0
JB
126%if %{with python2}
127%py_install
d1b18853 128
d1b18853 129%py_postclean
89c96ed0
JB
130%endif
131
d1b18853 132%clean
133rm -rf $RPM_BUILD_ROOT
134
89c96ed0 135%if %{with python2}
d1b18853 136%files
137%defattr(644,root,root,755)
67d01746 138%doc CHANGES.rst CONTRIBUTORS.txt NOTICE.txt README.rst TODO.txt
564086f1 139%attr(755,root,root) %{_bindir}/coverage
305b66d8 140%attr(755,root,root) %{_bindir}/coverage2
54d0d8d2 141%attr(755,root,root) %{_bindir}/coverage-%{py_ver}
3c63b87a
JB
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
305b66d8 147%{py_sitedir}/coverage-%{version}-py*.egg-info
d1b18853 148%endif
4af080a0 149
89c96ed0 150%if %{with python3}
4af080a0 151%files -n python3-%{module}
152%defattr(644,root,root,755)
67d01746 153%doc CHANGES.rst CONTRIBUTORS.txt NOTICE.txt README.rst TODO.txt
305b66d8 154%attr(755,root,root) %{_bindir}/coverage3
54d0d8d2 155%attr(755,root,root) %{_bindir}/coverage-%{py3_ver}
3c63b87a
JB
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
305b66d8 162%{py3_sitedir}/coverage-%{version}-py*.egg-info
89c96ed0 163%endif
This page took 0.058392 seconds and 4 git commands to generate.