Blame SPECS/python-oauthlib.spec

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