From 28f11ead4aae64891f6968858d93515d514d928c45ea718faca4b092afacf36a Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 5 Sep 2023 01:24:33 +0000 Subject: [PATCH] - Add patch remove-future-requirement.patch, drop future requirement - Switch to pyproject macros OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyjwkest?expand=0&rev=6 --- python-pyjwkest.changes | 6 ++++++ python-pyjwkest.spec | 15 +++++++-------- remove-future-requirement.patch | 13 +++++++++++++ 3 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 remove-future-requirement.patch diff --git a/python-pyjwkest.changes b/python-pyjwkest.changes index 14ec2a3..8bdd796 100644 --- a/python-pyjwkest.changes +++ b/python-pyjwkest.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Sep 5 01:24:06 UTC 2023 - Steve Kowalik + +- Add patch remove-future-requirement.patch, drop future requirement +- Switch to pyproject macros + ------------------------------------------------------------------- Wed Dec 8 11:22:56 UTC 2021 - pgajdos@suse.com diff --git a/python-pyjwkest.spec b/python-pyjwkest.spec index dd1b878..cbaaaf9 100644 --- a/python-pyjwkest.spec +++ b/python-pyjwkest.spec @@ -1,7 +1,7 @@ # # spec file for package python-pyjwkest # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,31 +16,30 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define commit 9ed11b406911dde70b281b2473a976ec88afd1a9 Name: python-pyjwkest Version: 1.4.2 Release: 0 Summary: Python implementation of JWT, JWE, JWS and JWK License: Apache-2.0 -Group: Development/Languages/Python URL: https://github.com//IdentityPython/pyjwkest #Source: https://files.pythonhosted.org/packages/source/p/pyjwkest/pyjwkest-%%{version}.tar.gz # 1.4.2, released on PyPI is untagged on GitHub, but we need the tests Source: https://github.com/IdentityPython/pyjwkest/archive/%{commit}.tar.gz#/pyjwkest-%{version}-gh.tar.gz # PATCH-FIX-OPENSUSE (upstream is unmaintained) -- py 3.9 compatibility. Works for all of py3. Patch0: py39-tobytes.patch +Patch1: remove-future-requirement.patch +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-future Requires: python-pycryptodomex Requires: python-requests Requires: python-six Requires(post): update-alternatives Requires(postun):update-alternatives BuildArch: noarch -BuildRequires: %{python_module future} BuildRequires: %{python_module pycryptodomex} BuildRequires: %{python_module pytest} BuildRequires: %{python_module requests} @@ -62,10 +61,10 @@ sed -i '1 {s:^#!:#!/usr/bin/env python:}' script/gen_symkey.py sed -i '1 {/^#!/d}' src/jwkest/*.py %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} # The peek.py script is very tiny, so avoid it reserving 'peek.py' as @@ -92,7 +91,7 @@ mv %{buildroot}%{_bindir}/peek.py %{buildroot}%{_bindir}/jwpeek.py %files %{python_files} %license LICENSE %doc README.rst -%{python_sitelib}/pyjwkest-%{version}*-info +%{python_sitelib}/pyjwkest-%{version}.dist-info %{python_sitelib}/jwkest %python_alternative %{_bindir}/gen_symkey.py %python_alternative %{_bindir}/jwdecrypt.py diff --git a/remove-future-requirement.patch b/remove-future-requirement.patch new file mode 100644 index 0000000..bf4bb2a --- /dev/null +++ b/remove-future-requirement.patch @@ -0,0 +1,13 @@ +Index: pyjwkest-9ed11b406911dde70b281b2473a976ec88afd1a9/setup.py +=================================================================== +--- pyjwkest-9ed11b406911dde70b281b2473a976ec88afd1a9.orig/setup.py ++++ pyjwkest-9ed11b406911dde70b281b2473a976ec88afd1a9/setup.py +@@ -45,7 +45,7 @@ setup( + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.5"], +- install_requires=["pycryptodomex", "requests", "six", "future"], ++ install_requires=["pycryptodomex", "requests", "six"], + tests_require=['pytest'], + zip_safe=False, + scripts=glob.glob('script/*.py'),