File snagboot.spec of Package snagboot

#
# spec file for package snagboot
#
# Copyright (c) 2025 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 python3

Name:           snagboot
Version:        2.4
Release:        0
Summary:        Generic recovery and reflashing tool for embedded platforms
License:        GPL-2.0-only
URL:            https://github.com/bootlin/snagboot
Source:         https://files.pythonhosted.org/packages/source/s/snagboot/snagboot-%{version}.tar.gz
BuildRequires:  python3-pip
BuildRequires:  python3-setuptools >= 61.0
# SECTION test requirements
BuildRequires:  python3-crccheck >= 1.3.0
BuildRequires:  python3-packaging >= 24.2
BuildRequires:  python3-pylibfdt >= 1.7.2.post1
BuildRequires:  python3-pyserial >= 3.5
BuildRequires:  python3-pyusb >= 1.2.1
BuildRequires:  python3-PyYAML >= 6.0
BuildRequires:  python3-tftpy >= 0.8.2
BuildRequires:  python3-xmodem >= 0.4.6
# /SECTION
BuildRequires:  fdupes
Requires:       python3-crccheck >= 1.3.0
Requires:       python3-packaging >= 24.2
Requires:       python3-pylibfdt >= 1.7.2.post1
Requires:       python3-pyserial >= 3.5
Requires:       python3-pyusb >= 1.2.1
Requires:       python3-PyYAML >= 6.0
Requires:       python3-tftpy >= 0.8.2
Requires:       python3-xmodem >= 0.4.6
Suggests:       python3-kivy == 2.3.1
BuildArch:      noarch

%description
Snagboot intends to be an open-source and generic replacement to the
vendor-specific, sometimes proprietary, tools used to recover and/or reflash
embedded platforms. Examples of such tools include STM32CubeProgrammer, SAM-BA
ISP, UUU, and sunxi-fel.

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

%build
%pyproject_wheel

%install
%pyproject_install
%fdupes %{buildroot}%{python_sitelib}

%files
%doc README.md
%license LICENSE
%{_bindir}/snagfactory
%{_bindir}/snagflash
%{_bindir}/snagrecover
%{python_sitelib}/snagfactory
%{python_sitelib}/snagflash
%{python_sitelib}/snagrecover
%{python_sitelib}/snagboot-%{version}.dist-info

%changelog
openSUSE Build Service is sponsored by