File yubikey-manager.spec of Package yubikey-manager4

#
# spec file for package yubikey-manager4
#
# 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/
#


%define pythons python310
#{?sle15_python_module_pythons}
Name:           yubikey-manager
Version:        4.0.9
Release:        0
Summary:        Python 3 library and command line tool for configuring a YubiKey
License:        BSD-2-Clause
Group:          Productivity/Security
URL:            https://developers.yubico.com/yubikey-manager/Releases
Source0:        https://developers.yubico.com/yubikey-manager/Releases/%{name}-%{version}.tar.gz
Source1:        https://developers.yubico.com/yubikey-manager/Releases/%{name}-%{version}.tar.gz.sig
BuildRequires:  fdupes
BuildRequires:  pkgconfig
BuildRequires:  %{python_module pyscard}
BuildRequires:  %{python_module click >= 7.0}
BuildRequires:  %{python_module cryptography >= 3 with cryptography < 3.4}
BuildRequires:  %{python_module fido2 >= 0.9}
BuildRequires:  %{python_module makefun >= 1.9.5}
BuildRequires:  %{python_module setuptools}
BuildRequires:  python-rpm-macros
# TEST DEPENDENCIES
BuildRequires:  %{python_module pyOpenSSL}
BuildRequires:  %{python_module makefun >= 1.9.5}
BuildRequires:  %{python_module pytest}
%if 0%{python_version_nodots} < 37
# dataclasses is required for tests if python < 3.7
BuildRequires:  %{python_module dataclasses >= 0.8}
Requires:       %{python_flavor}-dataclasses >= 0.8
%endif
Requires:       %{python_flavor}-click
Requires:       %{python_flavor}-cryptography
Requires:       %{python_flavor}-fido2 >= 0.9
Requires:       %{python_flavor}-pyscard
Recommends:     %{python_flavor}-pyOpenSSL
Provides:       %{python_flavor}-yubikey-manager = %{version}
Conflicts:      %{python_flavor}-yubikey-manager >= 5
Conflicts:      yubikey-manager >= 5
BuildArch:      noarch

%description
Python 3 library and command line tool for configuring a YubiKey.
YubiKey Manager (ykman) is a command line tool for configuring a YubiKey over
all transports. It is capable of reading out device information as well as
configuring several aspects of a YubiKey, including enabling or disabling
connection transports an programming various types of credentials.

%prep
%autosetup

%build
%python_build

%install
%python_install
%fdupes %{buildroot}
install -Dpm0644 man/ykman.1 %{buildroot}%{_mandir}/man1/ykman.1

%check
%pytest -k "not test_parse_pkcs12"

%files
%license COPYING*
%doc NEWS*
%{_bindir}/ykman
%{python_sitelib}/ykman
%{python_sitelib}/yubikey_manager-%{version}*-info
%{python_sitelib}/yubikit
%{_mandir}/man1/*

%changelog
openSUSE Build Service is sponsored by