File python-universal-silabs-flasher.spec of Package python-universal-silabs-flasher
#
# spec file for package python-universal-silabs-flasher
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
%define skip_python36 1
%define skip_python38 1
Name: python-universal-silabs-flasher
Version: 0.1.2
Release: 0
License: GPLv3
Summary: CPC, EZSP, or Spinel radio flasher
Group: Development/Languages/Python
Url: https://github.com/NabuCasa/universal-silabs-flasher
Source: https://files.pythonhosted.org/packages/source/u/universal-silabs-flasher/universal_silabs_flasher-%{version}.tar.gz
BuildRequires: %{python_module wheel}
BuildRequires: %{python_module poetry-core}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module click}
BuildRequires: %{python_module zigpy}
BuildRequires: %{python_module bellows >= 0.34.3}
BuildRequires: %{python_module coloredlogs}
BuildRequires: %{python_module async_timeout}
BuildRequires: %{python_module typing_extensions}
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires: python-click
Requires: python-zigpy
Requires: python-crc
Requires: python-bellows >= 0.34.3
Requires: python-gpiod
Requires: python-coloredlogs
Requires: python-async_timeout
Requires: python-typing_extensions
BuildArch: noarch
%python_subpackages
%description
%prep
%setup -q -n universal_silabs_flasher-%{version}
sed -i -e 's,^dynamic = .*,version = "%version",' pyproject.toml
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/universal-silabs-flasher
%post
%python_install_alternative universal-silabs-flasher
%postun
%python_uninstall_alternative universal-silabs-flasher
%files %{python_files}
%license LICENSE
%doc README.md
%python_alternative %{_bindir}/universal-silabs-flasher
%{python_sitelib}/*
%changelog