Blame SPECS/python-oauthlib.spec

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