commit 4cd4072f59a4d6bff754d4d3b94f9584c16a352fe64825870c6004acfc3ee82e Author: Matej Cepl Date: Mon Feb 7 21:41:36 2022 +0000 Accepting request 952067 from home:mslacken:pr * now with unit tests and correct name * "superseeds" 951553 * with minimal changelog OBS-URL: https://build.opensuse.org/request/show/952067 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-scitokens?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/python-scitokens.changes b/python-scitokens.changes new file mode 100644 index 0000000..cba967d --- /dev/null +++ b/python-scitokens.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Fri Feb 4 10:44:00 UTC 2022 - Christian Goll + +- initial commit of the python SciTokens interface diff --git a/python-scitokens.spec b/python-scitokens.spec new file mode 100644 index 0000000..f9de113 --- /dev/null +++ b/python-scitokens.spec @@ -0,0 +1,78 @@ +# +# spec file for package python-scitokens +# +# Copyright (c) 2022 SUSE LLC +# +# 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/ +# + + +%define bname scitokens + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} + +Name: python-scitokens +Version: 1.6.2 +Release: 0 +Summary: SciToken reference implementation library +License: Apache-2.0 +URL: https://scitokens.org +Source: https://github.com/scitokens/scitokens/archive/refs/tags/v1.6.2.tar.gz#/%{bname}-%{version}.tar.gz +BuildRequires: %{python_module PyJWT} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: %{python_module PyJWT} +Requires: %{python_module six} +BuildArch: noarch +Requires(post): update-alternatives +Requires(postun):update-alternatives +%python_subpackages + +%description +SciTokens provide a token format for distributed authorization. The tokens are +self-describing, can be verified in a distributed fashion (no need to contact +the issuer to determine if the token is valid). This is convenient for a +federated environment where several otherwise-independent storage endpoints +want to delegate trust for an issuer for managing a storage allocation. + +%prep +%setup -q -n scitokens-%{version} + +%build +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/scitokens-admin-create-key +%python_clone -a %{buildroot}%{_bindir}/scitokens-admin-create-token +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%post +%python_install_alternative scitokens-admin-create-key +%python_install_alternative scitokens-admin-create-token + +%postun +%python_uninstall_alternative scitokens-admin-create-key +%python_uninstall_alternative scitokens-admin-create-token + +%files %{python_files} +%{python_sitelib}/scitokens* +%python_alternative %{_bindir}/scitokens-admin-create-key +%python_alternative %{_bindir}/scitokens-admin-create-token + +%changelog diff --git a/scitokens-1.6.2.tar.gz b/scitokens-1.6.2.tar.gz new file mode 100644 index 0000000..23a9103 --- /dev/null +++ b/scitokens-1.6.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ac32ba24a4b6cea051cc436b888752e502005a91d636ebfdd715b2a325de4a2 +size 48381