Compare commits

...

1 Commits

Author SHA1 Message Date
8be2da8ba3 import RHEL 10 Beta python-oauthlib-3.2.2-4.el10 2024-11-20 13:29:44 +00:00
3 changed files with 139 additions and 116 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/v2.1.0.tar.gz
/v2.1.0.tar.gz
python-oauthlib-3.2.2.tar.gz

View File

@ -1,32 +1,15 @@
%if (0%{?fedora} > 0 && 0%{?fedora} < 32) || (0%{?rhel} > 0 && 0%{?rhel} <= 7)
%bcond_without python2
%bcond_without python3
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
%bcond_with python2
%bcond_without python3
%endif
%if 0%{?rhel} && 0%{?rhel} <= 7
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%{!?py2_build: %global py2_build %{__python2} setup.py build --executable="%{__python2} -s" %{?*}}
%{!?py2_install: %global py2_install %{__python2} setup.py install --skip-build --root %{buildroot} %{?*}}
%endif
%global modname oauthlib
# RHEL does not include pyjwt, blinker needed for extras
%bcond extras %{undefined rhel}
Name: python-oauthlib
Version: 2.1.0
Release: 1%{?dist}
Version: 3.2.2
Release: 4%{?dist}
Summary: An implementation of the OAuth request-signing logic
Group: Development/Libraries
License: BSD
License: BSD-3-Clause
URL: https://github.com/oauthlib/oauthlib
Source0: https://github.com/oauthlib/oauthlib/archive/v%{version}.tar.gz
Source0: https://github.com/oauthlib/oauthlib/archive/v%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
@ -38,53 +21,11 @@ onto your favourite web framework. If you're a maintainer of such a
library, write a thin veneer on top of OAuthLib and get OAuth support for
very little effort.
%if %{with python2}
%package -n python2-oauthlib
Summary: An implementation of the OAuth request-signing logic
Group: Development/Libraries
%{?python_provide:%python_provide python2-oauthlib}
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-nose
BuildRequires: python2-mock
BuildRequires: python2-blinker
BuildRequires: python2-jwt
BuildRequires: python2-cryptography
Requires: python2-jwt
Requires: python2-cryptography >= 0.8.1
%description -n python2-oauthlib
OAuthLib is a generic utility which implements the logic of OAuth without
assuming a specific HTTP request object or web framework. Use it to graft
OAuth client support onto your favorite HTTP library, or provider support
onto your favourite web framework. If you're a maintainer of such a
library, write a thin veneer on top of OAuthLib and get OAuth support for
very little effort.
%endif # with python2
%if %{with python3}
%package -n python3-oauthlib
Summary: An implementation of the OAuth request-signing logic
Group: Development/Libraries
%{?python_provide:%python_provide python3-oauthlib}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-nose
BuildRequires: python3-mock
BuildRequires: python3-blinker
BuildRequires: python3-jwt
BuildRequires: python3-cryptography
Requires: python3-jwt
Requires: python3-cryptography >= 0.8.1
BuildRequires: python3-pytest
%description -n python3-oauthlib
OAuthLib is a generic utility which implements the logic of OAuth without
@ -94,71 +35,154 @@ onto your favourite web framework. If you're a maintainer of such a
library, write a thin veneer on top of OAuthLib and get OAuth support for
very little effort.
%endif # with python3
%if %{with extras}
%pyproject_extras_subpkg -n python3-oauthlib rsa,signedtoken,signals
%endif
%prep
%setup -q -n %{modname}-%{version}
%autosetup -n oauthlib-%{version} -p1
# python-unittest2 is now provided by "python" package and python-unittest is retired
# adapt setup.py to reflect this fact downstream
sed -i "s/'unittest2', //" setup.py
# Remove bundled egg-info in case it exists
rm -rf %{modname}.egg-info
%generate_buildrequires
%pyproject_buildrequires %{?with_extras:-x rsa,signedtoken,signals}
%build
%if %{with python2}
%py2_build
%endif # with python2
%if %{with python3}
%py3_build
%endif # with python3
%pyproject_wheel
%install
%if %{with python2}
%py2_install
%endif # with python2
%if %{with python3}
%py3_install
%endif # with python3
%pyproject_install
%pyproject_save_files oauthlib
%check
%if %{with python2}
%{__python2} setup.py test
%endif # with python2
%if %{with python3}
%{__python3} setup.py test
%endif # with python3
# enable SHA-1 signatures for RSA tests
# also see https://github.com/pyca/cryptography/pull/6931 and rhbz#2060343
export OPENSSL_ENABLE_SHA1_SIGNATURES=yes
%if %{without extras}
echo 'import pytest; __getattr__ = lambda _: pytest.skip("this test needs jwt")' > jwt.py
%endif
%{pytest} \
%if %{without extras}
--ignore tests/oauth2/rfc6749/clients/test_service_application.py \
--ignore tests/oauth2/rfc6749/clients/test_web_application.py \
--ignore tests/oauth2/rfc6749/clients/test_mobile_application.py \
--ignore tests/oauth2/rfc6749/clients/test_legacy_application.py \
--ignore tests/oauth2/rfc6749/clients/test_backend_application.py \
--ignore tests/oauth2/rfc6749/test_parameters.py \
%endif
%{nil}
%if %{with python2}
%files -n python2-oauthlib
%files -n python3-oauthlib -f %{pyproject_files}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{modname}/
%{python2_sitelib}/%{modname}-%{version}*
%endif # with python2
%if %{with python3}
%files -n python3-oauthlib
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}-*
%endif # with python3
%changelog
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.2.2-4
- Bump release for June 2024 mass rebuild
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Sep 19 2023 Michel Lind <salimma@fedoraproject.org> - 3.2.2-1
- Update to 3.2.2 for CVE-2022-36087
- Fix FTBFS with Python 3.12 (rhbz#2192914)
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 3.2.1-5
- Rebuilt for Python 3.12
* Mon May 08 2023 Major Hayden <major@redhat.com> - 3.2.1-4
- Migrated to SPDX license
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Dec 13 2022 Major Hayden <major@redhat.com> - 3.2.1-2
- Add SHA1 signature fix for ELN from yselkowitz. 👏
* Mon Sep 12 2022 Dariusz Smigiel <dsmigiel@redhat.com) - 3.2.1-1
- Update spec file and sources for 3.2.1
- Fixes CVE-2022-36087
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 3.2.0-2
- Rebuilt for Python 3.11
* Thu Mar 24 2022 Michael Kelly <mkelly@arista.com> - 3.2.0-1
- Remove python-mock patches (not required in 3.2.0)
- Update spec file and sources for 3.2.0
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 3.0.2-10
- Rebuilt for Python 3.10
* Mon May 10 2021 Jakub Hrozek <jhrozek@redhat.com> - 3.1.0-2
- Don't use python-mock
- Use an actual URL as Source0 (thanks, churchyard)
* Mon Feb 8 2021 Jakub Hrozek <jhrozek@redhat.com> - 3.1.0-1
- Update to upstream 3.1.0
- Gets rid of obsolete python-nose dependency
- Nuke the python2/python3 conditionals, let's only support python3
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 10 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-7
- Add oauthlib[signedtoken] subpackage
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-6
- Rebuilt for Python 3.9
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.2-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jul 15 2019 <jdennis@redhat.com> - 3.0.2-1
- Update to upstream 3.0.2
- Resolves: rhbz#1730033
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Aug 3 2018 <jdennis@redhat.com> - 2.1.0-1
- upgrade to latest upstream 2.1.0
- Resolves: rhbz#1612380
* Tue Jul 10 2018 <jdennis@redhat.com> - 2.0.1-9
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jul 10 2018 <jdennis@redhat.com> - 2.0.1-10
- Restore use of bcond for python conditionals
* Tue Jul 10 2018 <jdennis@redhat.com> - 2.0.1-8
* Tue Jul 10 2018 <jdennis@redhat.com> - 2.0.1-9
- Unify spec file between Fedora and RHEL
* Wed May 16 2018 Charalampos Stratakis <cstratak@redhat.com> - 2.0.1-7
- Conditionalize the python2 subpackage
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.0.1-8
- Rebuilt for Python 3.7
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.1-7
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (v2.1.0.tar.gz) = 7935933d4c5be1eacf8688d6f0243dac8a43de35d19179839f72ee9fe9b02d4897d62a310475e741f0ed9a1c7e407bd846d51eb9884d8dd48b4624783cef0284
SHA512 (python-oauthlib-3.2.2.tar.gz) = c776cf6132d2155cd31c34e677984d9f5b2d113cf80232e6a28c92f43bbbfb9f1e4dc6fff4e94208438d65a4d182907cc4f2bef968d6c6c5c74f55323c3decc4