From 9f3f99a78496d0425bd94309ed02930be168f094 Mon Sep 17 00:00:00 2001 From: John Dennis Date: Wed, 12 Apr 2017 15:34:30 -0400 Subject: [PATCH] Bring spec file into closer alignment with rhel version --- python-requests-oauthlib.spec | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/python-requests-oauthlib.spec b/python-requests-oauthlib.spec index 8ffedc5..423afb2 100644 --- a/python-requests-oauthlib.spec +++ b/python-requests-oauthlib.spec @@ -2,9 +2,11 @@ # python3 and python version related macros # required to build python3- subpackage # are not available in el6 and el7 - %global with_python3 0 - %global __python2 %{__python} - %global python2_sitelib %{python_sitelib} + %bcond_with python3 + %{!?__python2: %global __python2 %{__python}} + %{!?python2_sitelib: %global python2_sitelib %{python_sitelib}} + %{!?py2_build: %global py2_build %{__python2} setup.py build --executable="%{__python2} -s" %{?*}} + %{!?py2_install: %global py2_install %{__python2} setup.py install --skip-build --root %{buildroot} %{?*}} %else %bcond_without python3 %endif @@ -14,7 +16,7 @@ Name: python-requests-oauthlib Version: 0.8.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: OAuthlib authentication support for Requests. Group: Development/Libraries @@ -28,9 +30,14 @@ BuildArch: noarch This project provides first-class OAuth library support for python-request. %package -n python2-%{distname} +%if 0%{?python_provide:1} +%python_provide python2-%{distname} +%else +Provides: python-%{distname} = %{?epoch:%{epoch}:}%{version}-%{release} +%endif + Summary: OAuthlib authentication support for Requests. Group: Development/Libraries -%{?python_provide:%python_provide python2-requests-oauthlib} BuildRequires: python2-devel BuildRequires: python2-setuptools @@ -41,16 +48,16 @@ BuildRequires: python2-requests >= 2.0.0 BuildRequires: python2-mock Requires: python2-oauthlib -Requires: python2-requests +Requires: python2-requests >= 2.0.0 %description -n python2-%{distname} This project provides first-class OAuth library support for python-request. %if 0%{?with_python3} %package -n python3-%{distname} +%{?python_provide:%python_provide python3-%{distname}} Summary: OAuthlib authentication support for Requests. Group: Development/Libraries -%{?python_provide:%python_provide python3-requests-oauthlib} BuildRequires: python3-devel BuildRequires: python3-setuptools @@ -106,6 +113,9 @@ rm -rf %{distname}.egg-info %endif %changelog +* Wed Apr 12 2017 John Dennis - 0.8.0-2 +- bring spec file for fedora & rhel closer together + * Sat Feb 25 2017 Kevin Fenzi - 0.8.0-1 - Update to 0.8.0. - Make sure to specify package versions required. Fixes bug #1320683