Blame SPECS/python-oauthlib.spec

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