Add an explicit python2 subpackage for #1313242.
This commit is contained in:
parent
6aabf88b02
commit
4cb6b82353
@ -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.
|
||||
|
||||
%package -n python2-%{distname}
|
||||
Summary: OAuthlib authentication support for Requests.
|
||||
Group: Development/Libraries
|
||||
%{?python_provide:%python_provide python2-requests-oauthlib}
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-mock
|
||||
BuildRequires: python2-setuptools
|
||||
|
||||
BuildRequires: python-oauthlib
|
||||
BuildRequires: python-requests
|
||||
BuildRequires: python2-oauthlib
|
||||
BuildRequires: python2-requests
|
||||
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
BuildRequires: python2-mock
|
||||
|
||||
BuildRequires: python3-oauthlib
|
||||
BuildRequires: python3-requests
|
||||
%endif
|
||||
Requires: python2-oauthlib
|
||||
Requires: python2-requests
|
||||
|
||||
|
||||
Requires: python-oauthlib
|
||||
Requires: python-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 <rbean@redhat.com> - 0.5.0-5
|
||||
- Add an explicit python2 subpackage for #1313242.
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user