summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2010-03-13 19:47:58 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2010-03-13 19:47:58 -0500
commitcd5b140623a78b634466ca43de6bbf24cfb7980d (patch)
tree4fcd0073c53da84c7a68ad9b477351e77be7969f
downloadrpm-pyconfig-cd5b140623a78b634466ca43de6bbf24cfb7980d.tar.gz
rpm-pyconfig-cd5b140623a78b634466ca43de6bbf24cfb7980d.tar.xz
rpm-pyconfig-cd5b140623a78b634466ca43de6bbf24cfb7980d.zip
Initial commit
-rw-r--r--python-coverage.spec149
1 files changed, 149 insertions, 0 deletions
diff --git a/python-coverage.spec b/python-coverage.spec
new file mode 100644
index 0000000..aaed9e5
--- /dev/null
+++ b/python-coverage.spec
@@ -0,0 +1,149 @@
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%endif
+
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+Name: python-coverage
+Summary: Code coverage testing module for Python
+Version: 3.2
+Release: 3
+License: BSD
+Group: System Environment/Libraries
+URL: http://nedbatchelder.com/code/modules/coverage.html
+Source0: http://pypi.python.org/packages/source/c/coverage/coverage-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: python-setuptools, python-devel
+Requires: python-setuptools
+%if 0%{?with_python3}
+BuildRequires: /usr/bin/2to3
+BuildRequires: python3-setuptools, python3-devel
+%endif # with_python3
+
+
+# Macro for defining subpackages:
+%define variant_package() \
+%package -n %{1}\
+Summary: Code coverage testing module for %{2}\
+Group: System Environment/Libraries\
+%description -n %{1}\
+Coverage.py is a Python module that measures code coverage during Python \
+execution. It uses the code analysis tools and tracing hooks provided in the \
+Python standard library to determine which lines are executable, and which \
+have been executed.\
+\
+This is the build for the %{3} variant of Python.\
+%{nil}
+
+%(for f in python26 python27 python31 python32 ; do
+ echo "%{variant_package $f $f $f}"
+done)
+
+%description
+Coverage.py is a Python module that measures code coverage during Python
+execution. It uses the code analysis tools and tracing hooks provided in the
+Python standard library to determine which lines are executable, and which
+have been executed.
+
+%if 0%{?with_python3}
+%package -n python3-coverage
+Summary: Code coverage testing module for Python 3
+Group: System Environment/Libraries
+# As the "coverage" executable requires the setuptools at runtime (#556290),
+# so the "python3-coverage" executable requires python3-setuptools:
+Requires: python3-setuptools
+
+%description -n python3-coverage
+Coverage.py is a Python 3 module that measures code coverage during Python
+execution. It uses the code analysis tools and tracing hooks provided in the
+Python standard library to determine which lines are executable, and which
+have been executed.
+%endif # with_python3
+
+%prep
+%setup -q -n coverage-%{version}
+chmod -x README.txt
+sed -i 's/\r//g' README.txt
+chmod -x coverage.egg-info/*.txt
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+pushd %{py3dir}
+2to3 --nobackups --write .
+popd
+%endif # if with_python3
+
+%build
+%{__python} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # if with_python3
+
+%install
+rm -rf %{buildroot}
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
+mv %{buildroot}/%{_bindir}/coverage %{buildroot}/%{_bindir}/python3-coverage
+popd
+%endif # if with_python3
+
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc README.txt
+%{_bindir}/coverage
+%{python_sitearch}/coverage/
+%{python_sitearch}/coverage*.egg-info/
+
+#%if 0%{?with_python3}
+#%files -n python3-coverage
+#%defattr(-,root,root,-)
+#%{_bindir}/python3-coverage
+#%{python3_sitearch}/coverage/
+#%{python3_sitearch}/coverage*.egg-info/
+#%endif # if with_python3
+
+%define variant_files() \
+%files -n %{1}\
+%defattr(-,root,root,-) \
+%doc README.txt \
+%{nil}
+
+%(for f in python26 python27 python31 python32 ; do
+ echo "%{variant_files $f}"
+done)
+
+
+%changelog
+* Fri Feb 5 2010 David Malcolm <dmalcolm@redhat.com> - 3.2-3
+- add python 3 subpackage (#536948)
+
+* Sun Jan 17 2010 Luke Macken <lmacken@redhat.com> - 3.2-2
+- Require python-setuptools (#556290)
+
+* Wed Dec 9 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 3.2-1
+- update to 3.2
+
+* Fri Oct 16 2009 Luke Macken <lmacken@redhat.com> - 3.1-1
+- Update to 3.1
+
+* Wed Aug 10 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 3.0.1-1
+- update to 3.0.1
+
+* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.85-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
+
+* Fri May 15 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.85-2
+- fix install invocation
+
+* Wed May 6 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 2.85-1
+- Initial package for Fedora