|
|
35b51d |
%if 0%{?el6}%{?el7}
|
|
|
35b51d |
# python3 and python version related macros
|
|
|
35b51d |
# required to build python3- subpackage
|
|
|
35b51d |
# are not available in el6 and el7
|
|
|
35b51d |
%bcond_with python3
|
|
|
35b51d |
%{!?__python2: %global __python2 %{__python}}
|
|
|
35b51d |
%{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
|
|
|
35b51d |
%{!?py2_build: %global py2_build %{__python2} setup.py build --executable="%{__python2} -s" %{?*}}
|
|
|
35b51d |
%{!?py2_install: %global py2_install %{__python2} setup.py install --skip-build --root %{buildroot} %{?*}}
|
|
|
35b51d |
%else
|
|
|
35b51d |
%bcond_without python3
|
|
|
35b51d |
%endif
|
|
|
35b51d |
|
|
|
35b51d |
%global distname requests-oauthlib
|
|
|
35b51d |
%global modname requests_oauthlib
|
|
|
35b51d |
|
|
|
35b51d |
Name: python-requests-oauthlib
|
|
|
35b51d |
Version: 0.8.0
|
|
|
35b51d |
Release: 5%{?dist}
|
|
|
35b51d |
Summary: OAuthlib authentication support for Requests.
|
|
|
35b51d |
|
|
|
35b51d |
Group: Development/Libraries
|
|
|
35b51d |
License: ISC
|
|
|
35b51d |
URL: http://pypi.python.org/pypi/requests-oauthlib
|
|
|
35b51d |
Source0: https://github.com/requests/requests-oauthlib/archive/v%{version}.tar.gz
|
|
|
35b51d |
|
|
|
35b51d |
BuildArch: noarch
|
|
|
35b51d |
|
|
|
35b51d |
%description
|
|
|
35b51d |
This project provides first-class OAuth library support for python-request.
|
|
|
35b51d |
|
|
|
35b51d |
%package -n python2-%{distname}
|
|
|
35b51d |
%if 0%{?python_provide:1}
|
|
|
35b51d |
%python_provide python2-%{distname}
|
|
|
35b51d |
%else
|
|
|
35b51d |
Provides: python-%{distname} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
35b51d |
%endif
|
|
|
35b51d |
|
|
|
35b51d |
Summary: OAuthlib authentication support for Requests.
|
|
|
35b51d |
Group: Development/Libraries
|
|
|
35b51d |
|
|
|
35b51d |
BuildRequires: python2-devel
|
|
|
35b51d |
BuildRequires: python2-setuptools
|
|
|
35b51d |
|
|
|
35b51d |
BuildRequires: python2-oauthlib >= 0.6.2
|
|
|
35b51d |
BuildRequires: python-requests >= 2.0.0
|
|
|
35b51d |
|
|
|
35b51d |
BuildRequires: python-mock
|
|
|
35b51d |
|
|
|
35b51d |
Requires: python2-oauthlib
|
|
|
35b51d |
Requires: python-requests >= 2.0.0
|
|
|
35b51d |
|
|
|
35b51d |
%description -n python2-%{distname}
|
|
|
35b51d |
This project provides first-class OAuth library support for python-request.
|
|
|
35b51d |
|
|
|
35b51d |
%if 0%{?with_python3}
|
|
|
35b51d |
%package -n python3-%{distname}
|
|
|
35b51d |
%{?python_provide:%python_provide python3-%{distname}}
|
|
|
35b51d |
Summary: OAuthlib authentication support for Requests.
|
|
|
35b51d |
Group: Development/Libraries
|
|
|
35b51d |
|
|
|
35b51d |
BuildRequires: python3-devel
|
|
|
35b51d |
BuildRequires: python3-setuptools
|
|
|
35b51d |
|
|
|
35b51d |
BuildRequires: python3-oauthlib >= 0.6.2
|
|
|
35b51d |
BuildRequires: python3-requests >= 2.0.0
|
|
|
35b51d |
|
|
|
35b51d |
BuildRequires: python3-mock
|
|
|
35b51d |
|
|
|
35b51d |
Requires: python3-oauthlib
|
|
|
35b51d |
Requires: python3-requests
|
|
|
35b51d |
|
|
|
35b51d |
%description -n python3-%{distname}
|
|
|
35b51d |
This project provides first-class OAuth library support for python-request.
|
|
|
35b51d |
%endif
|
|
|
35b51d |
|
|
|
35b51d |
%prep
|
|
|
35b51d |
%autosetup -n %{distname}-%{version}
|
|
|
35b51d |
|
|
|
35b51d |
# Remove bundled egg-info in case it exists
|
|
|
35b51d |
rm -rf %{distname}.egg-info
|
|
|
35b51d |
|
|
|
35b51d |
|
|
|
35b51d |
%build
|
|
|
35b51d |
%py2_build
|
|
|
35b51d |
%if 0%{?with_python3}
|
|
|
35b51d |
%py3_build
|
|
|
35b51d |
%endif
|
|
|
35b51d |
|
|
|
35b51d |
%install
|
|
|
35b51d |
%py2_install
|
|
|
35b51d |
%if 0%{?with_python3}
|
|
|
35b51d |
%py3_install
|
|
|
35b51d |
%endif
|
|
|
35b51d |
|
|
|
35b51d |
# Upstream doesn't actually ship the tests with the tarball.
|
|
|
35b51d |
# https://github.com/requests/requests-oauthlib/pull/91
|
|
|
35b51d |
#%%check
|
|
|
35b51d |
#%%{__python2} setup.py test
|
|
|
35b51d |
|
|
|
35b51d |
%files -n python2-%{distname}
|
|
|
35b51d |
%doc README.rst HISTORY.rst requirements.txt AUTHORS.rst
|
|
|
35b51d |
%license LICENSE
|
|
|
35b51d |
%{python2_sitelib}/%{modname}/
|
|
|
35b51d |
%{python2_sitelib}/%{modname}-%{version}*
|
|
|
35b51d |
|
|
|
35b51d |
%if 0%{?with_python3}
|
|
|
35b51d |
%files -n python3-%{distname}
|
|
|
35b51d |
%doc README.rst HISTORY.rst requirements.txt AUTHORS.rst
|
|
|
35b51d |
%license LICENSE
|
|
|
35b51d |
%{python3_sitelib}/%{modname}/
|
|
|
35b51d |
%{python3_sitelib}/%{modname}-%{version}*
|
|
|
35b51d |
%endif
|
|
|
35b51d |
|
|
|
35b51d |
%changelog
|
|
|
35b51d |
* Tue Apr 11 2017 John Dennis <jdennis@redhat.com> - 0.8.0-5
|
|
|
35b51d |
- BuildRequires had python-requests but the Requires was still referencing
|
|
|
35b51d |
python2-requests which is not yet provided in RHEL 7.4.,
|
|
|
35b51d |
also add the missing version dependency on python-requests.
|
|
|
35b51d |
Resolves: rhbz#1401783
|
|
|
35b51d |
|
|
|
35b51d |
* Fri Apr 7 2017 John Dennis <jdennis@redhat.com> - 0.8.0-4
|
|
|
35b51d |
- fix with_python3 conditional test
|
|
|
35b51d |
Resolves: rhbz#1401783
|
|
|
35b51d |
|
|
|
35b51d |
* Thu Apr 6 2017 John Dennis <jdennis@redhat.com> - 0.8.0-3
|
|
|
35b51d |
- fix python provides
|
|
|
35b51d |
fix with_python3
|
|
|
35b51d |
Resolves: rhbz#1401783
|
|
|
35b51d |
|
|
|
35b51d |
* Tue Apr 4 2017 John Dennis <jdennis@redhat.com> - 0.8.0-2
|
|
|
35b51d |
- Add Provides for unversioned python
|
|
|
35b51d |
Resolves: rhbz#1401783
|
|
|
35b51d |
|
|
|
35b51d |
* Fri Mar 17 2017 John Dennis <jdennis@redhat.com> - 0.8.0-1
|
|
|
35b51d |
- Initial import for RHEL-7
|
|
|
35b51d |
Resolves: rhbz#1401783
|
|
|
35b51d |
|