From 703d5559f950f8d2904c1a247ff10b47c2b2227c Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Fri, 11 Apr 2014 23:17:18 -0400 Subject: [PATCH] Use forward-compat python-crypto2.6 package for epel/rhel. --- python-oauthlib.spec | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/python-oauthlib.spec b/python-oauthlib.spec index 9ca1eaf..077aacd 100644 --- a/python-oauthlib.spec +++ b/python-oauthlib.spec @@ -13,7 +13,7 @@ Name: python-oauthlib Version: 0.6.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: An implementation of the OAuth request-signing logic Group: Development/Libraries @@ -27,12 +27,16 @@ BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-nose -BuildRequires: python-crypto >= 2.6 BuildRequires: python-unittest2 BuildRequires: python-mock +%if 0%{?rhel} && 0%{?rhel} <= 6 +BuildRequires: python-crypto2.6 +Requires: python-crypto2.6 +%else +BuildRequires: python-crypto >= 2.6 Requires: python-crypto >= 2.6 - +%endif %if 0%{?with_python3} BuildRequires: python3-devel @@ -72,6 +76,12 @@ very little effort. # Remove bundled egg-info in case it exists rm -rf %{modname}.egg-info + +# Make sure that setuptools knows to pick up the correct version of +# python-crypto on epel/rhel... +awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"pycrypto>=2.6\"]; import pkg_resources"}1' setup.py > setup.py.tmp +mv setup.py.tmp setup.py + %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} @@ -114,6 +124,9 @@ popd %endif %changelog +* Fri Apr 11 2014 Ralph Bean - 0.6.0-4 +- Use forward-compat python-crypto2.6 package for el6. + * Tue Jan 21 2014 Ralph Bean - 0.6.0-3 - Compat macros for el6.