Bring spec file into closer alignment with rhel version

This commit is contained in:
John Dennis 2017-04-12 15:34:30 -04:00
parent c919fcf4fa
commit 9f3f99a784

View File

@ -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 <jdennis@redhat.com> - 0.8.0-2
- bring spec file for fedora & rhel closer together
* Sat Feb 25 2017 Kevin Fenzi <kevin@scrye.com> - 0.8.0-1
- Update to 0.8.0.
- Make sure to specify package versions required. Fixes bug #1320683