From 4cb6b82353d6761ea63967bf0c8696a48aaf530f Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Jun 28 2016 17:09:13 +0000 Subject: Add an explicit python2 subpackage for #1313242. --- diff --git a/python-requests-oauthlib.spec b/python-requests-oauthlib.spec index 6bcef05..c40a7e5 100644 --- a/python-requests-oauthlib.spec +++ b/python-requests-oauthlib.spec @@ -14,7 +14,7 @@ Name: python-requests-oauthlib Version: 0.5.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: OAuthlib authentication support for Requests. Group: Development/Libraries @@ -24,33 +24,41 @@ Source0: http://pypi.python.org/packages/source/r/%{distname}/%{distn BuildArch: noarch +%description +This project provides first-class OAuth library support for python-request. -BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python-mock - -BuildRequires: python-oauthlib -BuildRequires: python-requests +%package -n python2-%{distname} +Summary: OAuthlib authentication support for Requests. +Group: Development/Libraries +%{?python_provide:%python_provide python2-requests-oauthlib} -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools +BuildRequires: python2-devel +BuildRequires: python2-setuptools -BuildRequires: python3-oauthlib -BuildRequires: python3-requests -%endif +BuildRequires: python2-oauthlib +BuildRequires: python2-requests +BuildRequires: python2-mock -Requires: python-oauthlib -Requires: python-requests +Requires: python2-oauthlib +Requires: python2-requests -%description +%description -n python2-%{distname} This project provides first-class OAuth library support for python-request. %if 0%{?with_python3} %package -n python3-%{distname} Summary: OAuthlib authentication support for Requests. Group: Development/Libraries +%{?python_provide:%python_provide python3-requests-oauthlib} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +BuildRequires: python3-oauthlib +BuildRequires: python3-requests + +BuildRequires: python3-mock Requires: python3-oauthlib Requires: python3-requests @@ -67,49 +75,42 @@ sed -i 's/requests>=2.0.0/requests/' setup.py # Remove bundled egg-info in case it exists rm -rf %{distname}.egg-info -%if 0%{?with_python3} -cp -a . %{py3dir} -%endif - %build -%{__python2} setup.py build - +%py2_build %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd +%py3_build %endif - %install -%{__python2} setup.py install -O1 --skip-build --root=%{buildroot} - +%py2_install %if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} -popd +%py3_install %endif - # Upstream doesn't actually ship the tests with the tarball. # https://github.com/requests/requests-oauthlib/pull/91 #%%check #%%{__python2} setup.py test -%files -%doc README.rst LICENSE HISTORY.rst requirements.txt AUTHORS.rst +%files -n python2-%{distname} +%doc README.rst HISTORY.rst requirements.txt AUTHORS.rst +%license LICENSE %{python2_sitelib}/%{modname}/ %{python2_sitelib}/%{modname}-%{version}* %if 0%{?with_python3} %files -n python3-%{distname} -%doc README.rst LICENSE HISTORY.rst requirements.txt AUTHORS.rst +%doc README.rst HISTORY.rst requirements.txt AUTHORS.rst +%license LICENSE %{python3_sitelib}/%{modname}/ %{python3_sitelib}/%{modname}-%{version}* %endif %changelog +* Tue Jun 28 2016 Ralph Bean - 0.5.0-5 +- Add an explicit python2 subpackage for #1313242. + * Thu Feb 04 2016 Fedora Release Engineering - 0.5.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild