summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2010-03-14 22:07:12 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2010-03-14 22:07:12 -0400
commitb91a6a9d31dd636a347e2be027fa4d3bfe89da80 (patch)
treeae73b8de4bffb4f2fe98cb6d7a2c8e07da005255
parent1d3bc96ee84fba11b73f84bc19d77801cb9562df (diff)
downloadrpm-pyconfig-master.tar.gz
rpm-pyconfig-master.tar.xz
rpm-pyconfig-master.zip
Use if-any-3HEADmaster
-rw-r--r--python-coverage.spec12
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}