4578d96
%if 0%{?el6}%{?el7}
4578d96
    # python3 and python version related macros
4578d96
    # required to build python3- subpackage
4578d96
    # are not available in el6 and el7
4578d96
    %global with_python3    0
4578d96
    %global __python2       %{__python}
4578d96
    %global python2_sitelib %{python_sitelib}
4578d96
%else
4578d96
    %bcond_without python3
4578d96
%endif
Jakub Dorňák 3eb89ae
df0dbc8
%global distname requests-oauthlib
df0dbc8
%global modname requests_oauthlib
df0dbc8
df0dbc8
Name:               python-requests-oauthlib
c919fcf
Version:            0.8.0
c919fcf
Release:            1%{?dist}
df0dbc8
Summary:            OAuthlib authentication support for Requests.
df0dbc8
df0dbc8
Group:              Development/Libraries
df0dbc8
License:            ISC
df0dbc8
URL:                http://pypi.python.org/pypi/requests-oauthlib
c919fcf
Source0:            https://github.com/requests/requests-oauthlib/archive/v%{version}.tar.gz
df0dbc8
df0dbc8
BuildArch:          noarch
df0dbc8
4cb6b82
%description
4cb6b82
This project provides first-class OAuth library support for python-request.
df0dbc8
4cb6b82
%package -n python2-%{distname}
4cb6b82
Summary:            OAuthlib authentication support for Requests.
4cb6b82
Group:              Development/Libraries
4cb6b82
%{?python_provide:%python_provide python2-requests-oauthlib}
df0dbc8
4cb6b82
BuildRequires:      python2-devel
4cb6b82
BuildRequires:      python2-setuptools
Jakub Dorňák 3eb89ae
c919fcf
BuildRequires:      python2-oauthlib >= 0.6.2
c919fcf
BuildRequires:      python2-requests >= 2.0.0
Jakub Dorňák 3eb89ae
4cb6b82
BuildRequires:      python2-mock
Jakub Dorňák 3eb89ae
4cb6b82
Requires:           python2-oauthlib
4cb6b82
Requires:           python2-requests
df0dbc8
4cb6b82
%description -n python2-%{distname}
df0dbc8
This project provides first-class OAuth library support for python-request.
df0dbc8
Jakub Dorňák 3eb89ae
%if 0%{?with_python3}
Jakub Dorňák 3eb89ae
%package -n python3-%{distname}
Jakub Dorňák 3eb89ae
Summary:            OAuthlib authentication support for Requests.
Jakub Dorňák 3eb89ae
Group:              Development/Libraries
4cb6b82
%{?python_provide:%python_provide python3-requests-oauthlib}
4cb6b82
4cb6b82
BuildRequires:      python3-devel
4cb6b82
BuildRequires:      python3-setuptools
4cb6b82
c919fcf
BuildRequires:      python3-oauthlib >= 0.6.2
c919fcf
BuildRequires:      python3-requests >= 2.0.0
4cb6b82
4cb6b82
BuildRequires:      python3-mock
Jakub Dorňák 3eb89ae
Jakub Dorňák 3eb89ae
Requires:           python3-oauthlib
Jakub Dorňák 3eb89ae
Requires:           python3-requests
Jakub Dorňák 3eb89ae
Jakub Dorňák 3eb89ae
%description -n python3-%{distname}
Jakub Dorňák 3eb89ae
This project provides first-class OAuth library support for python-request.
Jakub Dorňák 3eb89ae
%endif
Jakub Dorňák 3eb89ae
df0dbc8
%prep
c919fcf
%autosetup -n %{distname}-%{version}
15f2263
df0dbc8
# Remove bundled egg-info in case it exists
df0dbc8
rm -rf %{distname}.egg-info
df0dbc8
Jakub Dorňák 3eb89ae
df0dbc8
%build
4cb6b82
%py2_build
Jakub Dorňák 3eb89ae
%if 0%{?with_python3}
4cb6b82
%py3_build
Jakub Dorňák 3eb89ae
%endif
Jakub Dorňák 3eb89ae
df0dbc8
%install
4cb6b82
%py2_install
Jakub Dorňák 3eb89ae
%if 0%{?with_python3}
4cb6b82
%py3_install
Jakub Dorňák 3eb89ae
%endif
Jakub Dorňák 3eb89ae
df0dbc8
# Upstream doesn't actually ship the tests with the tarball.
df0dbc8
# https://github.com/requests/requests-oauthlib/pull/91
df0dbc8
#%%check
df0dbc8
#%%{__python2} setup.py test
df0dbc8
4cb6b82
%files -n python2-%{distname}
4cb6b82
%doc README.rst HISTORY.rst requirements.txt AUTHORS.rst
4cb6b82
%license LICENSE
df0dbc8
%{python2_sitelib}/%{modname}/
df0dbc8
%{python2_sitelib}/%{modname}-%{version}*
df0dbc8
Jakub Dorňák 3eb89ae
%if 0%{?with_python3}
Jakub Dorňák 3eb89ae
%files -n python3-%{distname}
4cb6b82
%doc README.rst HISTORY.rst requirements.txt AUTHORS.rst
4cb6b82
%license LICENSE
Jakub Dorňák 3eb89ae
%{python3_sitelib}/%{modname}/
Jakub Dorňák 3eb89ae
%{python3_sitelib}/%{modname}-%{version}*
Jakub Dorňák 3eb89ae
%endif
Jakub Dorňák 3eb89ae
df0dbc8
%changelog
c919fcf
* Sat Feb 25 2017 Kevin Fenzi <kevin@scrye.com> - 0.8.0-1
c919fcf
- Update to 0.8.0.
c919fcf
- Make sure to specify package versions required. Fixes bug #1320683
c919fcf
7c7421d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-8
7c7421d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
7c7421d
678f387
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.5.0-7
678f387
- Rebuild for Python 3.6
678f387
a5b74b9
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-6
a5b74b9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
a5b74b9
4cb6b82
* Tue Jun 28 2016 Ralph Bean <rbean@redhat.com> - 0.5.0-5
4cb6b82
- Add an explicit python2 subpackage for #1313242.
4cb6b82
6aabf88
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-4
6aabf88
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
6aabf88
6399f19
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-3
6399f19
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
6399f19
abb9535
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.0-2
abb9535
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
abb9535
a04f3a9
* Thu May 21 2015 Ralph Bean <rbean@redhat.com> - 0.5.0-1
a04f3a9
- new version
a04f3a9
15f2263
* Fri Jan 23 2015 Ralph Bean <rbean@redhat.com> - 0.4.0-7
15f2263
- Alter egg requirements for epel.
15f2263
24c044c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-6
24c044c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
24c044c
f5c3789
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.4.0-5
f5c3789
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
f5c3789
4578d96
* Mon Mar  3 2014 Jakub Dorňák <jdornak@redhat.com> - 0.4.0-4
4578d96
- python3 and python version related macros required to build
4578d96
  python3- subpackage are not available in el6 and el7
4578d96
Jakub Dorňák 3eb89ae
* Fri Nov 29 2013 Jakub Dorňák <jdornak@redhat.com> - 0.4.0-3
Jakub Dorňák 3eb89ae
- added python3 subpackage
Jakub Dorňák 3eb89ae
df0dbc8
* Fri Nov 01 2013 Ralph Bean <rbean@redhat.com> - 0.4.0-2
df0dbc8
- Modernized the python2 rpm macros as per review feedback.
df0dbc8
df0dbc8
* Thu Oct 31 2013 Ralph Bean <rbean@redhat.com> - 0.4.0-1
df0dbc8
- Initial package for Fedora