File python-esptool.spec of Package python-esptool

#
# spec file for package python-esptool
#
# Copyright (c) 2018 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-%{**}}
Name:           python-esptool
Version:        2.3.1
Release:        0
Summary:        A serial utility to communicate & flash code to Espressif ESP8266 & ESP32 chips
License:        GPL-2.0-or-later
Group:          Development/Languages/Python
URL:            https://github.com/espressif/esptool
Source:         https://files.pythonhosted.org/packages/source/e/esptool/esptool-%{version}.tar.gz
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module ecdsa}
BuildRequires:  %{python_module flake8 >= 3.2.0}
BuildRequires:  %{python_module flake8-future-import}
BuildRequires:  %{python_module flake8-import-order}
BuildRequires:  %{python_module pyaes}
BuildRequires:  %{python_module pyserial >= 2.5}
BuildRequires:  %{python_module setuptools}
BuildRequires:  python-rpm-macros
Requires:       python-ecdsa
Requires:       python-pyaes
Requires:       python-pyserial >= 2.5
BuildArch:      noarch

%python_subpackages

%description
A command line utility to communicate with the ROM bootloader in Espressif ESP8266 & ESP32 microcontrollers.

Allows flashing firmware, reading back firmware, querying chip parameters, etc.

%prep
%setup -q -n esptool-%{version}

%build
%python_build

%install
%python_install
%python_clone %{buildroot}%{_bindir}/esptool.py
%python_clone %{buildroot}%{_bindir}/espsecure.py
%python_clone %{buildroot}%{_bindir}/espefuse.py

%files %{python_files}
%license LICENSE
%doc README.md
%{_bindir}/esptool.py-%{python_bin_suffix}
%{_bindir}/espsecure.py-%{python_bin_suffix}
%{_bindir}/espefuse.py-%{python_bin_suffix}
%python3_only %{_bindir}/esptool.py
%python3_only %{_bindir}/espsecure.py
%python3_only %{_bindir}/espefuse.py
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by