14
0

Accepting request 889634 from home:bnavigator:branches:devel:languages:python

- Update to 1.4.2
  * no release notes
  * released on PyPI but not tagged in git repository
- Add py39-tobytes.patch for Python 3.9 compat
- Not actively maintained anymore. Just packaged because it is
  a BuildRequirement of other packages
  * python-oic
  * python-django-oidc-provider

OBS-URL: https://build.opensuse.org/request/show/889634
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyjwkest?expand=0&rev=3
This commit is contained in:
2021-05-01 22:27:49 +00:00
committed by Git OBS Bridge
parent 02af706016
commit 8fb68c9d36
5 changed files with 49 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pyjwkest
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,19 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define commit 9ed11b406911dde70b281b2473a976ec88afd1a9
Name: python-pyjwkest
Version: 1.4.0
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/rohe/pyjwkest
Source: https://github.com/rohe/pyjwkest/archive/v1.4.0.tar.gz#/pyjwkest-%{version}.tar.gz
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
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -33,27 +38,28 @@ Requires: python-pycryptodomex
Requires: python-requests
Requires: python-six
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
BuildRequires: %{python_module future}
BuildRequires: %{python_module pycryptodomex}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module six}
BuildRequires: %{python_module pytest-runner}
%python_subpackages
%description
Python implementation of JWT, JWE, JWS and JWK.
(JSON web signarure)
Note: This library is NOT actively maintained anymore.
%prep
%setup -q -n pyjwkest-%{version}
%autosetup -p1 -n pyjwkest-%{commit}
# https://github.com/rohe/pyjwkest/pull/1
chmod a+x script/gen_symkey.py
sed -i '1 {s:^#!:#!/usr/bin/env python:}' script/gen_symkey.py
sed -i '1 {/^#!/d}' src/jwkest/*.py
# This interferes with pytest collection, and is unused.
rm debug/A256KW/jwe_test.py
%build
%python_build
@@ -75,7 +81,7 @@ mv %{buildroot}%{_bindir}/peek.py %{buildroot}%{_bindir}/jwpeek.py
%python_clone -a %{buildroot}%{_bindir}/jwkutil.py
%check
%python_exec setup.py pytest
%pytest
%post
%python_install_alternative gen_symkey.py jwdecrypt.py jwenc.py jwpeek.py jwk_create.py jwk_export.py jwkutil.py
@@ -84,9 +90,9 @@ mv %{buildroot}%{_bindir}/peek.py %{buildroot}%{_bindir}/jwpeek.py
%python_uninstall_alternative gen_symkey.py jwdecrypt.py jwenc.py jwpeek.py jwk_create.py jwk_export.py jwkutil.py
%files %{python_files}
%license LICENSE.txt
%license LICENSE
%doc README.rst
%{python_sitelib}/pyjwkest*
%{python_sitelib}/pyjwkest-%{version}*-info
%{python_sitelib}/jwkest
%python_alternative %{_bindir}/gen_symkey.py
%python_alternative %{_bindir}/jwdecrypt.py