]> git.pld-linux.org Git - SPECS.git/blob - python-coverage.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / python-coverage.spec
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
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}
13 Version:        4.5.4
14 Release:        2
15 License:        Apache v2.0
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
23 %if %{with python2}
24 BuildRequires:  python-devel >= 1:2.6
25 BuildRequires:  python-setuptools >= 35.0.2
26 %if %{with tests}
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
37 %endif
38 %endif
39 %if %{with python3}
40 BuildRequires:  python3-devel >= 1:3.3
41 BuildRequires:  python3-setuptools >= 35.0.2
42 %if %{with tests}
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
51 %endif
52 %endif
53 %if %{with doc}
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
59 %endif
60 Requires:       python-modules >= 1:2.6
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 %description
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.
68
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ł.
74
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
80
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.
86
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ł.
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}
116 sphinx-build -b html -aqE doc doc/_build/html
117 %endif
118
119 %install
120 rm -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
133 rm -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.448725 seconds and 3 git commands to generate.