commit 9d15e6a55bf4351bbb2b605a9c2f2080c7aeabed2ffdcdf5282a336205e8c2b3 Author: Tomáš Chvátal Date: Thu Apr 18 07:46:56 2019 +0000 Accepting request 695400 from home:jayvdb:django - Activate test suite, using GitHub archive for the tests - Rename peek.py to jwpeek.py - Add missing runtime dependencies - Use fdupes, fix executable bits and hashbangs - Remove build dependency on devel OBS-URL: https://build.opensuse.org/request/show/695400 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyjwkest?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/pyjwkest-1.4.0.tar.gz b/pyjwkest-1.4.0.tar.gz new file mode 100644 index 0000000..1e75622 --- /dev/null +++ b/pyjwkest-1.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da7c2a0fa21bde050525a50b4b6ae7b265fc2319d598e44e84a4430961bed420 +size 91254 diff --git a/python-pyjwkest.changes b/python-pyjwkest.changes new file mode 100644 index 0000000..5bf0c9a --- /dev/null +++ b/python-pyjwkest.changes @@ -0,0 +1,14 @@ +------------------------------------------------------------------- +Thu Apr 11 12:41:06 UTC 2019 - John Vandenberg + +- Activate test suite, using GitHub archive for the tests +- Rename peek.py to jwpeek.py +- Add missing runtime dependencies +- Use fdupes, fix executable bits and hashbangs +- Remove build dependency on devel + +------------------------------------------------------------------- +Fri Jul 21 20:10:53 UTC 2017 - michael@stroeder.com + +- initial package of upstream release 1.4.0 (Python Singlespec) + diff --git a/python-pyjwkest.spec b/python-pyjwkest.spec new file mode 100644 index 0000000..5281bfa --- /dev/null +++ b/python-pyjwkest.spec @@ -0,0 +1,99 @@ +# +# spec file for package python-pyjwkest +# +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-pyjwkest +Version: 1.4.0 +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 +BuildRequires: %{python_module setuptools} +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 requests} +BuildRequires: %{python_module six} +BuildRequires: %{python_module pytest-runner} +%python_subpackages + +%description +Python implementation of JWT, JWE, JWS and JWK. + +%prep +%setup -q -n pyjwkest-%{version} +# 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 + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +# The peek.py script is very tiny, so avoid it reserving 'peek.py' as +# upstream 'peek' may relinquish it https://github.com/dcramer/peek/issues/1 +mv %{buildroot}%{_bindir}/peek.py %{buildroot}%{_bindir}/jwpeek.py + +%python_clone -a %{buildroot}%{_bindir}/gen_symkey.py +%python_clone -a %{buildroot}%{_bindir}/jwdecrypt.py +%python_clone -a %{buildroot}%{_bindir}/jwenc.py +%python_clone -a %{buildroot}%{_bindir}/jwpeek.py +%python_clone -a %{buildroot}%{_bindir}/jwk_create.py +%python_clone -a %{buildroot}%{_bindir}/jwk_export.py +%python_clone -a %{buildroot}%{_bindir}/jwkutil.py + +%check +%python_exec setup.py pytest + +%post +%python_install_alternative gen_symkey.py jwdecrypt.py jwenc.py jwpeek.py jwk_create.py jwk_export.py jwkutil.py + +%postun +%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 +%doc README.rst +%{python_sitelib}/pyjwkest* +%{python_sitelib}/jwkest +%python_alternative %{_bindir}/gen_symkey.py +%python_alternative %{_bindir}/jwdecrypt.py +%python_alternative %{_bindir}/jwenc.py +%python_alternative %{_bindir}/jwpeek.py +%python_alternative %{_bindir}/jwk_create.py +%python_alternative %{_bindir}/jwk_export.py +%python_alternative %{_bindir}/jwkutil.py + +%changelog