2017-09-29 16:26:27 +00:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
2013-11-01 14:49:07 +00:00
|
|
|
%global with_python3 1
|
|
|
|
%endif
|
|
|
|
|
2017-04-12 20:33:17 +00:00
|
|
|
%bcond_with jwcrypto
|
|
|
|
|
2014-01-21 15:14:52 +00:00
|
|
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
|
|
|
%{!?__python2: %global __python2 /usr/bin/python2}
|
|
|
|
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
|
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
2017-04-12 20:33:17 +00:00
|
|
|
%{!?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} %{?*}}
|
2014-01-21 15:14:52 +00:00
|
|
|
%endif
|
|
|
|
|
2017-04-12 20:33:17 +00:00
|
|
|
# commit corresponds to v2.0.1 tag
|
|
|
|
%global commit 3eb6fe934c8c8d6c34e22b4e4fc1bd01d0266df6
|
2015-05-20 16:34:54 +00:00
|
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
|
|
%global checkout 20150520git%{shortcommit}
|
|
|
|
|
|
|
|
%global gh_owner idan
|
|
|
|
%global gh_project oauthlib
|
2014-01-21 15:14:52 +00:00
|
|
|
|
2013-11-01 14:49:07 +00:00
|
|
|
%global modname oauthlib
|
|
|
|
|
|
|
|
Name: python-oauthlib
|
2017-04-12 20:33:17 +00:00
|
|
|
Version: 2.0.1
|
2017-09-29 16:26:27 +00:00
|
|
|
Release: 5%{?dist}
|
2013-11-01 14:49:07 +00:00
|
|
|
Summary: An implementation of the OAuth request-signing logic
|
|
|
|
|
|
|
|
Group: Development/Libraries
|
|
|
|
License: BSD
|
|
|
|
URL: http://pypi.python.org/pypi/oauthlib
|
2016-04-10 18:39:13 +00:00
|
|
|
Source0: http://pypi.python.org/packages/source/o/%{modname}/%{modname}-%{version}.tar.gz
|
|
|
|
#Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{commit}/%{gh_project}-%{commit}.tar.gz
|
2013-11-01 14:49:07 +00:00
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
2017-04-12 20:33:17 +00:00
|
|
|
Patch0: jwcrypto.patch
|
|
|
|
|
2016-06-28 17:00:52 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
OAuthLib is a generic utility which implements the logic of OAuth without
|
|
|
|
assuming a specific HTTP request object or web framework. Use it to graft
|
|
|
|
OAuth client support onto your favorite HTTP library, or provider support
|
|
|
|
onto your favourite web framework. If you're a maintainer of such a
|
|
|
|
library, write a thin veneer on top of OAuthLib and get OAuth support for
|
|
|
|
very little effort.
|
|
|
|
|
|
|
|
%package -n python2-oauthlib
|
|
|
|
Summary: An implementation of the OAuth request-signing logic
|
|
|
|
Group: Development/Libraries
|
|
|
|
%{?python_provide:%python_provide python2-oauthlib}
|
|
|
|
|
2013-11-01 14:49:07 +00:00
|
|
|
BuildRequires: python2-devel
|
2016-06-28 17:00:52 +00:00
|
|
|
BuildRequires: python2-setuptools
|
2013-11-01 14:49:07 +00:00
|
|
|
|
2016-06-28 17:00:52 +00:00
|
|
|
BuildRequires: python2-nose
|
|
|
|
BuildRequires: python2-mock
|
2016-06-28 17:05:12 +00:00
|
|
|
BuildRequires: python-blinker
|
2013-11-01 14:49:07 +00:00
|
|
|
|
2017-04-12 20:33:17 +00:00
|
|
|
%if %{with jwcrypto}
|
|
|
|
BuildRequires: python2-jwcrypto
|
2014-04-12 03:17:18 +00:00
|
|
|
%else
|
2017-04-12 20:33:17 +00:00
|
|
|
BuildRequires: python-jwt
|
2014-04-12 03:17:18 +00:00
|
|
|
%endif
|
2017-04-12 20:33:17 +00:00
|
|
|
BuildRequires: python2-cryptography
|
|
|
|
|
|
|
|
%if %{with jwcrypto}
|
|
|
|
Requires: python2-jwcrypto
|
|
|
|
%else
|
2017-04-17 15:18:57 +00:00
|
|
|
Requires: python-jwt
|
2017-04-12 20:33:17 +00:00
|
|
|
%endif
|
2017-04-13 20:10:25 +00:00
|
|
|
Requires: python2-cryptography >= 0.8.1
|
2013-11-01 14:49:07 +00:00
|
|
|
|
2016-06-28 17:00:52 +00:00
|
|
|
%description -n python2-oauthlib
|
2013-11-01 14:49:07 +00:00
|
|
|
OAuthLib is a generic utility which implements the logic of OAuth without
|
|
|
|
assuming a specific HTTP request object or web framework. Use it to graft
|
|
|
|
OAuth client support onto your favorite HTTP library, or provider support
|
|
|
|
onto your favourite web framework. If you're a maintainer of such a
|
|
|
|
library, write a thin veneer on top of OAuthLib and get OAuth support for
|
|
|
|
very little effort.
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
%package -n python3-oauthlib
|
|
|
|
Summary: An implementation of the OAuth request-signing logic
|
|
|
|
Group: Development/Libraries
|
2016-06-28 17:00:52 +00:00
|
|
|
%{?python_provide:%python_provide python3-oauthlib}
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
|
|
|
BuildRequires: python3-nose
|
|
|
|
BuildRequires: python3-mock
|
|
|
|
BuildRequires: python3-blinker
|
2013-11-01 14:49:07 +00:00
|
|
|
|
2017-04-12 20:33:17 +00:00
|
|
|
%if %{with jwcrypto}
|
|
|
|
BuildRequires: python3-jwcrypto
|
|
|
|
%else
|
|
|
|
BuildRequires: python3-jwt
|
|
|
|
%endif
|
|
|
|
BuildRequires: python3-cryptography
|
|
|
|
|
|
|
|
%if %{with jwcrypto}
|
|
|
|
Requires: python3-jwcrypto
|
|
|
|
%else
|
|
|
|
Requires: python3-jwt
|
|
|
|
%endif
|
2017-04-13 20:10:25 +00:00
|
|
|
Requires: python3-cryptography >= 0.8.1
|
2013-11-01 14:49:07 +00:00
|
|
|
|
|
|
|
%description -n python3-oauthlib
|
|
|
|
OAuthLib is a generic utility which implements the logic of OAuth without
|
|
|
|
assuming a specific HTTP request object or web framework. Use it to graft
|
|
|
|
OAuth client support onto your favorite HTTP library, or provider support
|
|
|
|
onto your favourite web framework. If you're a maintainer of such a
|
|
|
|
library, write a thin veneer on top of OAuthLib and get OAuth support for
|
|
|
|
very little effort.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%prep
|
2016-04-10 18:39:13 +00:00
|
|
|
%setup -q -n %{modname}-%{version}
|
|
|
|
#%%setup -q -n %{gh_project}-%{commit}
|
2013-11-01 14:49:07 +00:00
|
|
|
|
2017-04-12 20:33:17 +00:00
|
|
|
%if %{with jwcrypto}
|
|
|
|
%patch0 -p1
|
|
|
|
%endif
|
|
|
|
|
2015-05-20 16:34:54 +00:00
|
|
|
# python-unittest2 is now provided by "python" package and python-unittest is retired
|
|
|
|
# adapt setup.py to reflect this fact downstream
|
|
|
|
sed -i "s/'unittest2', //" setup.py
|
2014-05-16 11:26:03 +00:00
|
|
|
|
2013-11-01 14:49:07 +00:00
|
|
|
# Remove bundled egg-info in case it exists
|
|
|
|
rm -rf %{modname}.egg-info
|
2014-04-12 03:17:18 +00:00
|
|
|
|
2013-11-01 14:49:07 +00:00
|
|
|
%build
|
2016-06-28 17:00:52 +00:00
|
|
|
%py2_build
|
2013-11-01 14:49:07 +00:00
|
|
|
%if 0%{?with_python3}
|
2016-06-28 17:00:52 +00:00
|
|
|
%py3_build
|
2013-11-01 14:49:07 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%install
|
2016-06-28 17:00:52 +00:00
|
|
|
%py2_install
|
2013-11-01 14:49:07 +00:00
|
|
|
%if 0%{?with_python3}
|
2016-06-28 17:00:52 +00:00
|
|
|
%py3_install
|
2013-11-01 14:49:07 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%check
|
|
|
|
%{__python2} setup.py test
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
%{__python3} setup.py test
|
|
|
|
%endif
|
|
|
|
|
2016-06-28 17:00:52 +00:00
|
|
|
%files -n python2-oauthlib
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2013-11-01 14:49:07 +00:00
|
|
|
%{python2_sitelib}/%{modname}/
|
|
|
|
%{python2_sitelib}/%{modname}-%{version}*
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
%files -n python3-oauthlib
|
2016-06-28 17:00:52 +00:00
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2013-11-01 14:49:07 +00:00
|
|
|
%{python3_sitelib}/%{modname}/
|
|
|
|
%{python3_sitelib}/%{modname}-%{version}-*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|
2017-09-29 16:26:27 +00:00
|
|
|
* Fri Sep 29 2017 Troy Dawson <tdawson@redhat.com> - 0.7.19-5
|
|
|
|
- Cleanup spec file conditionals
|
|
|
|
|
2017-07-27 11:06:16 +00:00
|
|
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
|
|
2017-04-17 15:18:57 +00:00
|
|
|
* Mon Apr 17 2017 John Dennis <jdennis@redhat.com> - 2.0.1-3
|
|
|
|
- fix dependency on python2-jwt, should be python-jwt
|
|
|
|
|
2017-04-13 20:10:25 +00:00
|
|
|
* Fri Apr 13 2017 Dennis Gilmore <dennis@ausil.us> - 2.0.1-2
|
|
|
|
- add spaces around the >= for Requires
|
|
|
|
|
2017-04-12 20:33:17 +00:00
|
|
|
* Thu Mar 16 2017 John Dennis <jdennis@redhat.com> - 2.0.1-1
|
|
|
|
- Upgrade to upstream 2.0.1
|
|
|
|
- port from jwt to jwcrypto (conditional build)
|
|
|
|
- bring into alignment with rhel spec file
|
|
|
|
|
2017-02-11 09:46:44 +00:00
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
|
2016-12-13 16:05:02 +00:00
|
|
|
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 1.0.3-4
|
|
|
|
- Rebuild for Python 3.6
|
|
|
|
|
2016-07-19 10:43:37 +00:00
|
|
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-3
|
|
|
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
|
|
|
2016-06-28 17:00:52 +00:00
|
|
|
* Tue Jun 28 2016 Ralph Bean <rbean@redhat.com> - 1.0.3-2
|
|
|
|
- Modernize python macros.
|
|
|
|
|
2016-04-10 18:39:13 +00:00
|
|
|
* Sun Apr 10 2016 Kevin Fenzi <kevin@scrye.com> - 1.0.3-1
|
|
|
|
- Update to 1.0.3
|
|
|
|
- Add python2 provides (fixes bug #1313235 and #1314349)
|
|
|
|
|
2016-02-04 20:19:20 +00:00
|
|
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-5.20150520git514cad7
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
|
|
2015-11-10 16:31:25 +00:00
|
|
|
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-4.20150520git514cad7
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
|
|
|
2015-06-18 20:06:11 +00:00
|
|
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-3.20150520git514cad7
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
|
2015-05-20 16:34:54 +00:00
|
|
|
* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 0.7.2-2.20150520git514cad7
|
|
|
|
- new version, from a git checkout
|
|
|
|
- Replace our patch with a sed statement.
|
|
|
|
|
2014-06-07 21:45:59 +00:00
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
|
2014-05-16 11:02:07 +00:00
|
|
|
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.6.0-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
|
|
|
|
2014-04-12 03:17:18 +00:00
|
|
|
* Fri Apr 11 2014 Ralph Bean <rbean@redhat.com> - 0.6.0-4
|
|
|
|
- Use forward-compat python-crypto2.6 package for el6.
|
|
|
|
|
2014-01-21 15:14:52 +00:00
|
|
|
* Tue Jan 21 2014 Ralph Bean <rbean@redhat.com> - 0.6.0-3
|
|
|
|
- Compat macros for el6.
|
|
|
|
|
2013-11-01 14:49:07 +00:00
|
|
|
* Fri Nov 01 2013 Ralph Bean <rbean@redhat.com> - 0.6.0-2
|
|
|
|
- Modernized python2 rpmmacros.
|
|
|
|
|
|
|
|
* Thu Oct 31 2013 Ralph Bean <rbean@redhat.com> - 0.6.0-1
|
|
|
|
- Initial package for Fedora
|