avoid python3 on rhel7 and adjust guards for rhel6

This commit is contained in:
Pádraig Brady 2014-01-28 10:51:04 +00:00
parent e160057f92
commit 2f853042e7

View File

@ -1,4 +1,4 @@
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
%if 0%{?fedora} > 12
%global with_python3 1
%endif
@ -26,7 +26,7 @@ Requires: python-mako
Requires: python-setuptools
# See if we're building for python earlier than 2.7
%if %{?rhel}%{!?rhel:0} >= 6
%if %{?rhel}%{!?rhel:0} <= 6
BuildRequires: python-sqlalchemy0.7 >= 0.7.4
BuildRequires: python-argparse
BuildRequires: python-nose1.1
@ -97,7 +97,7 @@ cp -a . %{py3dir}
%endif
# Make sure that epel/rhel picks up the correct version of sqlalchemy
%if %{?rhel}%{!?rhel:0} >= 6
%if %{?rhel}%{!?rhel:0} <= 6
awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"sqlalchemy>=0.6\", \"nose>=0.11\"]; import pkg_resources"}1' setup.py > setup.py.tmp
mv setup.py.tmp setup.py
%endif