]>
Commit | Line | Data |
---|---|---|
d1b18853 | 1 | %define module coverage |
2 | Summary: Tool for measuring code coverage of Python programs | |
3 | Name: python-%{module} | |
111ad2f5 | 4 | Version: 3.5 |
34386890 | 5 | Release: 1 |
d1b18853 | 6 | License: BSD |
7 | Group: Development/Languages/Python | |
8 | Source0: http://pypi.python.org/packages/source/c/coverage/%{module}-%{version}.tar.gz | |
111ad2f5 | 9 | # Source0-md5: dee158cf20b17f54e644fba25c2ebfc2 |
d1b18853 | 10 | URL: http://nedbatchelder.com/code/coverage |
11 | BuildRequires: python-devel | |
61734f13 | 12 | BuildRequires: python-setuptools |
d1b18853 | 13 | BuildRequires: rpm-pythonprov |
d1b18853 | 14 | BuildRequires: rpmbuild(macros) >= 1.219 |
61734f13 | 15 | Requires: python-modules |
d1b18853 | 16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %description | |
61734f13 | 19 | Coverage.py is a tool for measuring code coverage of Python programs. |
20 | It monitors your program, noting which parts of the code have been | |
21 | executed, then analyzes the source to identify code that could have | |
22 | been executed but was not. | |
d1b18853 | 23 | |
24 | %prep | |
25 | %setup -q -n %{module}-%{version} | |
26 | ||
27 | %build | |
28 | export CFLAGS="%{rpmcflags}" | |
29 | %{__python} setup.py build | |
30 | ||
31 | %install | |
32 | rm -rf $RPM_BUILD_ROOT | |
33 | %{__python} setup.py install \ | |
34 | --optimize=2 \ | |
35 | --root=$RPM_BUILD_ROOT | |
36 | ||
d1b18853 | 37 | %py_postclean |
38 | ||
39 | %clean | |
40 | rm -rf $RPM_BUILD_ROOT | |
41 | ||
42 | %files | |
43 | %defattr(644,root,root,755) | |
44 | %doc CHANGES.txt README.txt | |
34386890 ER |
45 | %attr(755,root,root) %{_bindir}/coverage |
46 | %dir %{py_sitedir}/%{module} | |
d1b18853 | 47 | %{py_sitedir}/%{module}/*.py[co] |
48 | %attr(755,root,root) %{py_sitedir}/%{module}/*.so | |
34386890 | 49 | %{py_sitedir}/%{module}/htmlfiles |
d1b18853 | 50 | %if "%{py_ver}" > "2.4" |
34386890 | 51 | %{py_sitedir}/coverage-%{version}*.egg-info |
d1b18853 | 52 | %endif |