Upgrade to upstream 2.0.1
port from jwt to jwcrypto (conditional build) bring into alignment with rhel spec file
This commit is contained in:
parent
74c26e2689
commit
b22a32b781
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/oauthlib-0.6.0.tar.gz
|
||||
/oauthlib-514cad74bde4cd7781b496155058a79507245798.tar.gz
|
||||
/oauthlib-1.0.3.tar.gz
|
||||
/oauthlib-2.0.1.tar.gz
|
||||
|
@ -2,13 +2,18 @@
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%bcond_with jwcrypto
|
||||
|
||||
%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))")}
|
||||
%{!?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} %{?*}}
|
||||
%endif
|
||||
|
||||
%global commit 514cad74bde4cd7781b496155058a79507245798
|
||||
# commit corresponds to v2.0.1 tag
|
||||
%global commit 3eb6fe934c8c8d6c34e22b4e4fc1bd01d0266df6
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global checkout 20150520git%{shortcommit}
|
||||
|
||||
@ -18,8 +23,8 @@
|
||||
%global modname oauthlib
|
||||
|
||||
Name: python-oauthlib
|
||||
Version: 1.0.3
|
||||
Release: 5%{?dist}
|
||||
Version: 2.0.1
|
||||
Release: 1%{?dist}
|
||||
Summary: An implementation of the OAuth request-signing logic
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -30,6 +35,8 @@ Source0: http://pypi.python.org/packages/source/o/%{modname}/%{modnam
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Patch0: jwcrypto.patch
|
||||
|
||||
|
||||
%description
|
||||
OAuthLib is a generic utility which implements the logic of OAuth without
|
||||
@ -50,15 +57,20 @@ BuildRequires: python2-setuptools
|
||||
BuildRequires: python2-nose
|
||||
BuildRequires: python2-mock
|
||||
BuildRequires: python-blinker
|
||||
BuildRequires: python-jwt >= 1.0
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||
BuildRequires: python-crypto2.6
|
||||
Requires: python-crypto2.6
|
||||
%if %{with jwcrypto}
|
||||
BuildRequires: python2-jwcrypto
|
||||
%else
|
||||
BuildRequires: python-crypto >= 2.6
|
||||
Requires: python-crypto >= 2.6
|
||||
BuildRequires: python-jwt
|
||||
%endif
|
||||
BuildRequires: python2-cryptography
|
||||
|
||||
%if %{with jwcrypto}
|
||||
Requires: python2-jwcrypto
|
||||
%else
|
||||
Requires: python2-jwt
|
||||
%endif
|
||||
Requires: python2-cryptography>=0.8.1
|
||||
|
||||
%description -n python2-oauthlib
|
||||
OAuthLib is a generic utility which implements the logic of OAuth without
|
||||
@ -78,12 +90,22 @@ BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
|
||||
BuildRequires: python3-nose
|
||||
BuildRequires: python3-crypto >= 2.6
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-blinker
|
||||
BuildRequires: python3-jwt >= 1.0
|
||||
|
||||
Requires: python3-crypto >= 2.6
|
||||
%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
|
||||
Requires: python3-cryptography>=0.8.1
|
||||
|
||||
%description -n python3-oauthlib
|
||||
OAuthLib is a generic utility which implements the logic of OAuth without
|
||||
@ -98,6 +120,10 @@ very little effort.
|
||||
%setup -q -n %{modname}-%{version}
|
||||
#%%setup -q -n %{gh_project}-%{commit}
|
||||
|
||||
%if %{with jwcrypto}
|
||||
%patch0 -p1
|
||||
%endif
|
||||
|
||||
# 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
|
||||
@ -105,11 +131,6 @@ sed -i "s/'unittest2', //" setup.py
|
||||
# Remove bundled egg-info in case it exists
|
||||
rm -rf %{modname}.egg-info
|
||||
|
||||
# Make sure that setuptools knows to pick up the correct version of
|
||||
# python-crypto on epel/rhel...
|
||||
awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"pycrypto>=2.6\"]; import pkg_resources"}1' setup.py > setup.py.tmp
|
||||
mv setup.py.tmp setup.py
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%if 0%{?with_python3}
|
||||
@ -143,6 +164,11 @@ mv setup.py.tmp setup.py
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user