diff options
-rw-r--r-- | python-coverage.spec | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/python-coverage.spec b/python-coverage.spec index 71dc520..2bfdefd 100644 --- a/python-coverage.spec +++ b/python-coverage.spec @@ -1,7 +1,3 @@ -%if 0%{?fedora} > 12 || 0%{?rhel} > 6 -%global with_python3 1 -%endif - Name: python-coverage Summary: Code coverage testing module for Python Version: 3.2 @@ -12,11 +8,11 @@ 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} +%(rpm-pyconfig --ifany-3 --eval " BuildRequires: /usr/bin/2to3 BuildRequires: python3-setuptools, python3-devel -%endif # with_python3 +") +# FIXME: enumerate the build requirements? %global SHARED_DESC \ Coverage.py is a Python module that measures code coverage during Python\ @@ -50,7 +46,7 @@ chmod -x coverage.egg-info/*.txt # Generate pristine Python 2 code cp -a . ../pristine -# Generate pristine Python 3 code +# Generate pristine Python 3 code if needed: rpm-pyconfig --ifany-3 && ( rm -rf %{py3dir} cp -a . %{py3dir} |