]>
Commit | Line | Data |
---|---|---|
89c96ed0 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
d1b18853 | 6 | %define module coverage |
7 | Summary: Tool for measuring code coverage of Python programs | |
89c96ed0 | 8 | Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie |
d1b18853 | 9 | Name: python-%{module} |
564086f1 | 10 | Version: 4.2 |
d86b2076 | 11 | Release: 2 |
305b66d8 | 12 | License: Apache v2.0 |
d1b18853 | 13 | Group: Development/Languages/Python |
89c96ed0 | 14 | #Source0Download: https://pypi.python.org/simple/coverage/ |
564086f1 JB |
15 | Source0: https://files.pythonhosted.org/packages/source/c/coverage/%{module}-%{version}.tar.gz |
16 | # Source0-md5: 1e09362a3f35d589f942359441050a6e | |
89c96ed0 JB |
17 | URL: http://coverage.readthedocs.org/ |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
305b66d8 | 21 | BuildRequires: python-devel >= 1:2.6 |
61734f13 | 22 | BuildRequires: python-setuptools |
89c96ed0 JB |
23 | %endif |
24 | %if %{with python3} | |
305b66d8 JB |
25 | BuildRequires: python3-devel >= 1:3.3 |
26 | BuildRequires: python3-setuptools | |
89c96ed0 | 27 | %endif |
305b66d8 | 28 | Requires: python-modules >= 1:2.6 |
d1b18853 | 29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
61734f13 | 32 | Coverage.py is a tool for measuring code coverage of Python programs. |
33 | It monitors your program, noting which parts of the code have been | |
34 | executed, then analyzes the source to identify code that could have | |
35 | been executed but was not. | |
d1b18853 | 36 | |
89c96ed0 JB |
37 | %description -l pl.UTF-8 |
38 | Coverage.py to narzędzie do szacowania pokrycia kodu programów w | |
39 | Pythonie. Monitoruje program, zapisując, które części kodu zostały | |
40 | wykonane, a następnie analizuje kod źródłowy w celu zidentyfikowania | |
41 | kodu, który mógłby zostać wykonany, ale nie był. | |
42 | ||
4af080a0 | 43 | %package -n python3-%{module} |
44 | Summary: Tool for measuring code coverage of Python programs | |
89c96ed0 | 45 | Summary(pl.UTF-8): Narzędzie do szacowania pokrycia kodu programów w Pythonie |
4af080a0 | 46 | Group: Development/Languages/Python |
305b66d8 | 47 | Requires: python3-modules >= 1:3.3 |
4af080a0 | 48 | |
49 | %description -n python3-%{module} | |
50 | Coverage.py is a tool for measuring code coverage of Python programs. | |
51 | It monitors your program, noting which parts of the code have been | |
52 | executed, then analyzes the source to identify code that could have | |
53 | been executed but was not. | |
54 | ||
89c96ed0 JB |
55 | %description -n python3-%{module} -l pl.UTF-8 |
56 | Coverage.py to narzędzie do szacowania pokrycia kodu programów w | |
57 | Pythonie. Monitoruje program, zapisując, które części kodu zostały | |
58 | wykonane, a następnie analizuje kod źródłowy w celu zidentyfikowania | |
59 | kodu, który mógłby zostać wykonany, ale nie był. | |
60 | ||
d1b18853 | 61 | %prep |
62 | %setup -q -n %{module}-%{version} | |
63 | ||
64 | %build | |
89c96ed0 JB |
65 | %if %{with python2} |
66 | %py_build | |
67 | %endif | |
68 | ||
69 | %if %{with python3} | |
70 | %py3_build | |
71 | %endif | |
d1b18853 | 72 | |
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
4af080a0 | 75 | |
564086f1 JB |
76 | %if %{with python3} |
77 | %py3_install | |
78 | %endif | |
79 | ||
89c96ed0 JB |
80 | %if %{with python2} |
81 | %py_install | |
d1b18853 | 82 | |
d1b18853 | 83 | %py_postclean |
89c96ed0 JB |
84 | %endif |
85 | ||
d1b18853 | 86 | %clean |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89c96ed0 | 89 | %if %{with python2} |
d1b18853 | 90 | %files |
91 | %defattr(644,root,root,755) | |
305b66d8 | 92 | %doc AUTHORS.txt CHANGES.rst NOTICE.txt README.rst TODO.txt |
564086f1 | 93 | %attr(755,root,root) %{_bindir}/coverage |
305b66d8 | 94 | %attr(755,root,root) %{_bindir}/coverage2 |
54d0d8d2 | 95 | %attr(755,root,root) %{_bindir}/coverage-%{py_ver} |
34386890 | 96 | %dir %{py_sitedir}/%{module} |
d1b18853 | 97 | %{py_sitedir}/%{module}/*.py[co] |
98 | %attr(755,root,root) %{py_sitedir}/%{module}/*.so | |
34386890 | 99 | %{py_sitedir}/%{module}/htmlfiles |
305b66d8 | 100 | %{py_sitedir}/coverage-%{version}-py*.egg-info |
d1b18853 | 101 | %endif |
4af080a0 | 102 | |
89c96ed0 | 103 | %if %{with python3} |
4af080a0 | 104 | %files -n python3-%{module} |
105 | %defattr(644,root,root,755) | |
305b66d8 JB |
106 | %doc AUTHORS.txt CHANGES.rst NOTICE.txt README.rst TODO.txt |
107 | %attr(755,root,root) %{_bindir}/coverage3 | |
54d0d8d2 | 108 | %attr(755,root,root) %{_bindir}/coverage-%{py3_ver} |
4af080a0 | 109 | %dir %{py3_sitedir}/%{module} |
110 | %attr(755,root,root) %{py3_sitedir}/%{module}/*.so | |
111 | %{py3_sitedir}/%{module}/*.py | |
112 | %{py3_sitedir}/%{module}/__pycache__ | |
113 | %{py3_sitedir}/%{module}/htmlfiles | |
305b66d8 | 114 | %{py3_sitedir}/coverage-%{version}-py*.egg-info |
89c96ed0 | 115 | %endif |