forked from pool/python-pyjwkest
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:
16
py39-tobytes.patch
Normal file
16
py39-tobytes.patch
Normal file
@@ -0,0 +1,16 @@
|
||||
Index: pyjwkest-9ed11b406911dde70b281b2473a976ec88afd1a9/tests/test_4_jwe.py
|
||||
===================================================================
|
||||
--- pyjwkest-9ed11b406911dde70b281b2473a976ec88afd1a9.orig/tests/test_4_jwe.py
|
||||
+++ pyjwkest-9ed11b406911dde70b281b2473a976ec88afd1a9/tests/test_4_jwe.py
|
||||
@@ -25,7 +25,10 @@ __author__ = 'rohe0002'
|
||||
|
||||
|
||||
def intarr2bytes(arr):
|
||||
- return array.array('B', arr).tostring()
|
||||
+ if sys.version_info[0] >= 3:
|
||||
+ return array.array('B', arr).tobytes()
|
||||
+ else:
|
||||
+ return array.array('B', arr).tostring()
|
||||
|
||||
|
||||
def bytes2intarr(bts):
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:da7c2a0fa21bde050525a50b4b6ae7b265fc2319d598e44e84a4430961bed420
|
||||
size 91254
|
3
pyjwkest-1.4.2-gh.tar.gz
Normal file
3
pyjwkest-1.4.2-gh.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2323990fe33aebf0e47300f2ce77da001d87445f6387912b3e5758b11e1ad860
|
||||
size 94026
|
@@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 30 18:38:03 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 11 12:41:06 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user