Blame SPECS/python-oauthlib.spec

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