Blame SPECS/python-oauthlib.spec

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