1 %define module coverage
2 Summary: Tool for measuring code coverage of Python programs
7 Group: Development/Languages/Python
8 Source0: http://pypi.python.org/packages/source/c/coverage/%{module}-%{version}.tar.gz
9 # Source0-md5: dee158cf20b17f54e644fba25c2ebfc2
10 URL: http://nedbatchelder.com/code/coverage
11 BuildRequires: python-devel
12 BuildRequires: python-setuptools
13 BuildRequires: rpm-pythonprov
14 BuildRequires: rpmbuild(macros) >= 1.219
15 Requires: python-modules
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
25 %setup -q -n %{module}-%{version}
28 export CFLAGS="%{rpmcflags}"
29 %{__python} setup.py build
32 rm -rf $RPM_BUILD_ROOT
33 %{__python} setup.py install \
35 --root=$RPM_BUILD_ROOT
40 rm -rf $RPM_BUILD_ROOT
43 %defattr(644,root,root,755)
44 %doc CHANGES.txt README.txt
45 %attr(755,root,root) %{_bindir}/coverage
46 %dir %{py_sitedir}/%{module}
47 %{py_sitedir}/%{module}/*.py[co]
48 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
49 %{py_sitedir}/%{module}/htmlfiles
50 %if "%{py_ver}" > "2.4"
51 %{py_sitedir}/coverage-%{version}*.egg-info