]>
Commit | Line | Data |
---|---|---|
d1b18853 | 1 | %define module coverage |
2 | Summary: Tool for measuring code coverage of Python programs | |
3 | Name: python-%{module} | |
ec3f6ca5 | 4 | Version: 3.7.1 |
d1ee1df8 | 5 | Release: 6 |
d1b18853 | 6 | License: BSD |
7 | Group: Development/Languages/Python | |
8 | Source0: http://pypi.python.org/packages/source/c/coverage/%{module}-%{version}.tar.gz | |
ec3f6ca5 | 9 | # Source0-md5: c47b36ceb17eaff3ecfab3bcd347d0df |
d1b18853 | 10 | URL: http://nedbatchelder.com/code/coverage |
11 | BuildRequires: python-devel | |
61734f13 | 12 | BuildRequires: python-setuptools |
d1b18853 | 13 | BuildRequires: rpm-pythonprov |
4af080a0 | 14 | BuildRequires: python3-devel |
15 | BuildRequires: python3-distribute | |
16 | BuildRequires: rpm-pythonprov | |
3efcb534 | 17 | BuildRequires: rpmbuild(macros) >= 1.710 |
61734f13 | 18 | Requires: python-modules |
d1b18853 | 19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
20 | ||
21 | %description | |
61734f13 | 22 | Coverage.py is a tool for measuring code coverage of Python programs. |
23 | It monitors your program, noting which parts of the code have been | |
24 | executed, then analyzes the source to identify code that could have | |
25 | been executed but was not. | |
d1b18853 | 26 | |
4af080a0 | 27 | %package -n python3-%{module} |
28 | Summary: Tool for measuring code coverage of Python programs | |
29 | Group: Development/Languages/Python | |
30 | Requires: python3-modules | |
31 | ||
32 | %description -n python3-%{module} | |
33 | Coverage.py is a tool for measuring code coverage of Python programs. | |
34 | It monitors your program, noting which parts of the code have been | |
35 | executed, then analyzes the source to identify code that could have | |
36 | been executed but was not. | |
37 | ||
d1b18853 | 38 | %prep |
39 | %setup -q -n %{module}-%{version} | |
40 | ||
41 | %build | |
6dfabba8 JK |
42 | %py_build --build-base py2 |
43 | %py3_build --build-base py3 | |
d1b18853 | 44 | |
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
4af080a0 | 47 | |
6dfabba8 | 48 | %py_build \ |
4af080a0 | 49 | --build-base py2 \ |
50 | install \ | |
51 | --root=$RPM_BUILD_ROOT \ | |
52 | --optimize=2 | |
53 | ||
6dfabba8 | 54 | %py3_build \ |
4af080a0 | 55 | --build-base py3 \ |
56 | install \ | |
57 | --root=$RPM_BUILD_ROOT \ | |
58 | --optimize=2 | |
d1b18853 | 59 | |
d1b18853 | 60 | %py_postclean |
61 | ||
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
65 | %files | |
66 | %defattr(644,root,root,755) | |
67 | %doc CHANGES.txt README.txt | |
54d0d8d2 | 68 | %attr(755,root,root) %{_bindir}/coverage-%{py_ver} |
34386890 | 69 | %dir %{py_sitedir}/%{module} |
d1b18853 | 70 | %{py_sitedir}/%{module}/*.py[co] |
71 | %attr(755,root,root) %{py_sitedir}/%{module}/*.so | |
34386890 | 72 | %{py_sitedir}/%{module}/htmlfiles |
d1b18853 | 73 | %if "%{py_ver}" > "2.4" |
34386890 | 74 | %{py_sitedir}/coverage-%{version}*.egg-info |
d1b18853 | 75 | %endif |
4af080a0 | 76 | |
77 | %files -n python3-%{module} | |
78 | %defattr(644,root,root,755) | |
79 | %doc CHANGES.txt README.txt | |
54d0d8d2 | 80 | %attr(755,root,root) %{_bindir}/coverage-%{py3_ver} |
4af080a0 | 81 | %dir %{py3_sitedir}/%{module} |
82 | %attr(755,root,root) %{py3_sitedir}/%{module}/*.so | |
83 | %{py3_sitedir}/%{module}/*.py | |
84 | %{py3_sitedir}/%{module}/__pycache__ | |
85 | %{py3_sitedir}/%{module}/htmlfiles | |
86 | %{py3_sitedir}/*.egg-info |