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: 67d4e393f4c6a5ffc18605409d2aa1ac
10 URL: http://nedbatchelder.com/code/coverage
11 BuildRequires: python-devel
12 BuildRequires: python-setuptools
13 BuildRequires: rpm-pythonprov
14 BuildRequires: python3-devel
15 BuildRequires: python3-distribute
16 BuildRequires: rpm-pythonprov
17 BuildRequires: rpmbuild(macros) >= 1.219
18 Requires: python-modules
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
27 %package -n python3-%{module}
28 Summary: Tool for measuring code coverage of Python programs
29 Group: Development/Languages/Python
30 Requires: python3-modules
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.
39 %setup -q -n %{module}-%{version}
42 export CFLAGS="%{rpmcflags}"
43 %{__python} setup.py build --build-base py2
44 %{__python3} setup.py build --build-base py3
47 rm -rf $RPM_BUILD_ROOT
49 %{__python} setup.py build \
52 --root=$RPM_BUILD_ROOT \
55 %{__python3} setup.py build \
58 --root=$RPM_BUILD_ROOT \
64 rm -rf $RPM_BUILD_ROOT
67 %defattr(644,root,root,755)
68 %doc CHANGES.txt README.txt
69 %attr(755,root,root) %{_bindir}/coverage-2.7
70 %dir %{py_sitedir}/%{module}
71 %{py_sitedir}/%{module}/*.py[co]
72 %attr(755,root,root) %{py_sitedir}/%{module}/*.so
73 %{py_sitedir}/%{module}/htmlfiles
74 %if "%{py_ver}" > "2.4"
75 %{py_sitedir}/coverage-%{version}*.egg-info
78 %files -n python3-%{module}
79 %defattr(644,root,root,755)
80 %doc CHANGES.txt README.txt
81 %attr(755,root,root) %{_bindir}/coverage-3.3
82 %dir %{py3_sitedir}/%{module}
83 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
84 %{py3_sitedir}/%{module}/*.py
85 %{py3_sitedir}/%{module}/__pycache__
86 %{py3_sitedir}/%{module}/htmlfiles
87 %{py3_sitedir}/*.egg-info