File python-pynitrokey.spec of Package python-pynitrokey

#
# spec file for package python-pynitrokey
#
# Copyright (c) 2023 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/
#


Name:           python-pynitrokey
Version:        0.4.39
Release:        0
Summary:        Python Library for Nitrokey devices
License:        MIT
URL:            None
Source:         https://files.pythonhosted.org/packages/source/p/pynitrokey/pynitrokey-%{version}.tar.gz
BuildRequires:  python-rpm-macros
#BuildRequires:  %{python_module flit_core >= 3.2}
#BuildRequires:  %{python_module pip}
# SECTION test requirements
BuildRequires:  %{python_module certifi >= 14.5.14}
BuildRequires:  %{python_module cffi}
BuildRequires:  %{python_module click >= 8.0}
BuildRequires:  %{python_module click-aliases}
BuildRequires:  %{python_module cryptography >= 39.0.1}
BuildRequires:  %{python_module ecdsa}
BuildRequires:  %{python_module fido2 >= 1.1.0}
BuildRequires:  %{python_module frozendict >= 2.3.4}
BuildRequires:  intelhex
BuildRequires:  %{python_module nkdfu}
BuildRequires:  %{python_module protobuf >= 3.17.3}
BuildRequires:  %{python_module pyserial}
BuildRequires:  %{python_module python-dateutil >= 2.7.0}
BuildRequires:  %{python_module pyusb}
BuildRequires:  %{python_module requests}
BuildRequires:  %{python_module semver}
BuildRequires:  %{python_module spsdk >= 1.10.1}
BuildRequires:  %{python_module tlv8}
BuildRequires:  %{python_module tqdm}
BuildRequires:  %{python_module typing_extensions >= 4.3.0}
BuildRequires:  %{python_module urllib3 >= 1.26.7}
# /SECTION
BuildRequires:  fdupes
Requires:       python-certifi >= 14.5.14
Requires:       python-cffi
Requires:       python-click >= 8.0
Requires:       python-click-aliases
Requires:       python-cryptography >= 39.0.1
Requires:       python-ecdsa
Requires:       python-fido2 >= 1.1.0
Requires:       python-frozendict >= 2.3.4
Requires:       python-intelhex
Requires:       python-nkdfu
Requires:       python-protobuf >= 3.17.3
Requires:       python-pyserial
Requires:       python-python-dateutil >= 2.7.0
Requires:       python-pyusb
Requires:       python-requests
Requires:       python-semver
Requires:       python-spsdk >= 1.10.1
Requires:       python-tlv8
Requires:       python-tqdm
Requires:       python-typing_extensions >= 4.3.0
Requires:       python-urllib3 >= 1.26.7
#Suggests:       python-black >= 22.1.0
#Suggests:       python-flake8
#Suggests:       python-flit >= 3.2
#Suggests:       python-ipython
#Suggests:       python-isort
#Suggests:       python-mypy >= 1.4
#Suggests:       python-pyinstaller == 5.9.0
#Suggests:       python-types-requests
#Suggests:       python-types-tqdm
#Suggests:       python-pytest
#Suggests:       python-pytest-reporter-html1
#Suggests:       python-oath
#Suggests:       python-pyscard >= 2.0.0
BuildArch:      noarch
%python_subpackages

%description
A command line interface for the Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 and NetHSM.


%prep
%autosetup -p1 -n pynitrokey-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/nitropy
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
CHOOSE: %pytest OR %pyunittest -v OR CUSTOM

%post
%python_install_alternative nitropy

%postun
%python_uninstall_alternative nitropy

%files %{python_files}
%doc README.md
%python_alternative %{_bindir}/nitropy
%{python_sitelib}/pynitrokey
%{python_sitelib}/pynitrokey-%{version}.dist-info

%changelog
openSUSE Build Service is sponsored by