2018-11-29 22:01:41 +01:00
|
|
|
#
|
2022-05-29 22:52:04 +02:00
|
|
|
# spec file
|
2018-11-29 22:01:41 +01:00
|
|
|
#
|
2022-05-29 22:52:04 +02:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2018-11-29 22:01:41 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-05-29 22:52:04 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test-backend-cryptography"
|
|
|
|
%define psuffix -%{flavor}
|
|
|
|
%bcond_without test
|
|
|
|
%bcond_without testcryptography
|
|
|
|
%bcond_with testnative
|
|
|
|
%endif
|
|
|
|
%if "%{flavor}" == "test-backend-native"
|
|
|
|
%define psuffix -%{flavor}
|
|
|
|
%bcond_without test
|
|
|
|
%bcond_with testcryptography
|
|
|
|
%bcond_without testnative
|
|
|
|
%endif
|
|
|
|
%if "%{flavor}" == ""
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%bcond_with testcryptography
|
|
|
|
%bcond_with testnative
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
|
|
|
%define skip_python2 1
|
2023-06-14 08:23:04 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2022-05-29 22:52:04 +02:00
|
|
|
Name: python-python-jose%{psuffix}
|
|
|
|
Version: 3.3.0
|
2018-11-29 22:01:41 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: JOSE implementation in Python
|
|
|
|
License: MIT
|
2020-03-10 11:06:24 +01:00
|
|
|
URL: https://github.com/mpdavis/python-jose
|
2022-05-29 22:52:04 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/python-jose/python-jose-%{version}.tar.gz
|
2019-04-11 11:00:34 +02:00
|
|
|
Patch0: unpin-deps.patch
|
2020-08-06 07:42:30 +02:00
|
|
|
BuildRequires: %{python_module setuptools >= 39.2.0}
|
2018-11-29 22:01:41 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2022-05-29 22:52:04 +02:00
|
|
|
Requires: python-ecdsa >= 0.16
|
|
|
|
Requires: python-pyasn1
|
|
|
|
Requires: python-rsa
|
2018-11-29 22:01:41 +01:00
|
|
|
BuildArch: noarch
|
2022-05-29 22:52:04 +02:00
|
|
|
%if %{with test}
|
2020-03-10 11:06:24 +01:00
|
|
|
BuildRequires: %{python_module pytest}
|
2022-05-29 22:52:04 +02:00
|
|
|
%if %{with testcryptography}
|
|
|
|
BuildRequires: %{python_module python-jose-cryptography = %{version}}
|
|
|
|
%endif
|
|
|
|
%if %{with testnative}
|
|
|
|
BuildRequires: %{python_module python-jose = %{version}}
|
|
|
|
%endif
|
|
|
|
%endif
|
2018-11-29 22:01:41 +01:00
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
A JavaScript Object Signing and Encryption (JOSE) technologies
|
|
|
|
implementation in Python.
|
|
|
|
|
2022-05-29 22:52:04 +02:00
|
|
|
python-jose implements different cryptographic backends.
|
|
|
|
Consuming python packages must select the backend as an extra
|
|
|
|
when installing python-jose. RPM packages must select the
|
|
|
|
corresponding rpm subpackage. If no backend is selected, the
|
|
|
|
main package uses the native-python backend.
|
|
|
|
|
|
|
|
%package cryptography
|
|
|
|
Summary: JOSE implementation in Python, cryptography extra
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
Requires: python-cryptography >= 3.4.0
|
|
|
|
|
|
|
|
%description cryptography
|
|
|
|
A JavaScript Object Signing and Encryption (JOSE) technologies
|
|
|
|
implementation in Python.
|
|
|
|
|
|
|
|
python-jose implements three different cryptographic backends.
|
|
|
|
This package provides the python-jose[cryptography] extra.
|
|
|
|
|
2018-11-29 22:01:41 +01:00
|
|
|
%prep
|
2022-05-29 22:52:04 +02:00
|
|
|
%autosetup -p1 -n python-jose-%{version}
|
2018-11-29 22:01:41 +01:00
|
|
|
|
2022-05-29 22:52:04 +02:00
|
|
|
%if ! %{with test}
|
2018-11-29 22:01:41 +01:00
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2022-05-29 22:52:04 +02:00
|
|
|
%endif
|
2018-11-29 22:01:41 +01:00
|
|
|
|
2022-05-29 22:52:04 +02:00
|
|
|
%if %{with test}
|
2019-04-11 11:00:34 +02:00
|
|
|
%check
|
2022-05-29 22:52:04 +02:00
|
|
|
%pytest -rsEf
|
|
|
|
%endif
|
2019-04-11 11:00:34 +02:00
|
|
|
|
2022-05-29 22:52:04 +02:00
|
|
|
%if ! %{with test}
|
2018-11-29 22:01:41 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
2022-05-29 22:52:04 +02:00
|
|
|
%{python_sitelib}/python_jose-%{version}*-info
|
|
|
|
%{python_sitelib}/jose
|
|
|
|
|
|
|
|
%files %{python_files cryptography}
|
|
|
|
%doc README.rst
|
|
|
|
%license LICENSE
|
|
|
|
%endif
|
2018-11-29 22:01:41 +01:00
|
|
|
|
|
|
|
%changelog
|