forked from pool/python-esptool
## Breaking changes
* Public Python API redesign: Reworked the public API to work as a Python
module. Command functions accept explicit parameters (no args object)
* CLI overhaul: esptool, espefuse, espsecure now use click for CLI argument
parsing and rich-click for nice CLI rendering
* All commands / options names have replaced underscores (_) with dashes
(-) (e.g., flash_id -> flash-id).
* Removed .py suffix from scripts (e.g., esptool.py flash-id -> esptool
flash-id).
* Centralised logging: All tools' output now goes through the EsptoolLogger
class, allowing easy redirection
* image-info: Deprecated the --version 1 output format
* errors: Errors are now printed to STDERR, added KeyboardInterrupt
handling
* make-image: Removed the ESP8266 make-image command in favor of other
workflows
* espefuse: Removed execute-scripts in favor of the new public API
* Removed support for beta chip targets: ESP32-C5(beta3), ESP32-C6(beta),
ESP32-H2(beta1/2), ESP32-S3(beta2) are no longer supported
* Deprecated support for Python 3.7, 3.8, and 3.9
* write-flash: Removed the superfluous --verify option
## New Features
* ESP32-P4: Add ECO5 support
* ESP32-C5: Add support for >16 MB flash sizes
* espefuse: Add custom key purposes for ESP32-C6/C5/P4
* espefuse: Support burning ECDSA_384 keys
* espefuse: Clean up limitation for BLOCK9 usage
* espefuse: Add support for burning 512-bit keys on ESP32-C5
* logging: Added collapsible output stages and ASCII progress bars
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-esptool?expand=0&rev=32
128 lines
4.5 KiB
RPMSpec
128 lines
4.5 KiB
RPMSpec
#
|
|
# spec file for package python-esptool
|
|
#
|
|
# Copyright (c) 2025 SUSE LLC and contributors
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-esptool
|
|
Version: 5.1.0
|
|
Release: 0
|
|
Summary: A serial utility to communicate & flash code to Espressif ESP8266 & ESP32 chips
|
|
License: GPL-2.0-or-later
|
|
URL: https://github.com/espressif/esptool
|
|
Source: https://github.com/espressif/esptool/archive/v%{version}.tar.gz#/esptool-%{version}.tar.gz
|
|
BuildRequires: %{python_module PyYAML}
|
|
BuildRequires: %{python_module base >= 3.10}
|
|
BuildRequires: %{python_module bitstring >= 3.1.6}
|
|
BuildRequires: %{python_module intelhex}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module pyelftools}
|
|
BuildRequires: %{python_module pyserial >= 3.3}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module reedsolo >= 1.5.3}
|
|
BuildRequires: %{python_module requests}
|
|
BuildRequires: %{python_module rich-click}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: fdupes
|
|
BuildRequires: openssl
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-PyYAML >= 5.1
|
|
Requires: python-bitstring >= 3.1.6
|
|
Requires: python-click
|
|
Requires: python-cryptography >= 43
|
|
Requires: python-intelhex
|
|
Requires: python-pyserial >= 3.3
|
|
Requires: python-reedsolo >= 1.5.3
|
|
Requires: python-rich-click
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
BuildArch: noarch
|
|
%if 0%{?python_version_nodots} < 37
|
|
BuildRequires: %{python_module cryptography}
|
|
%endif
|
|
%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
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_clone -a %{buildroot}%{_bindir}/espefuse.py
|
|
%python_clone -a %{buildroot}%{_bindir}/espsecure.py
|
|
%python_clone -a %{buildroot}%{_bindir}/esptool.py
|
|
%python_clone -a %{buildroot}%{_bindir}/esp_rfc2217_server.py
|
|
%python_clone -a %{buildroot}%{_bindir}/espefuse
|
|
%python_clone -a %{buildroot}%{_bindir}/espsecure
|
|
%python_clone -a %{buildroot}%{_bindir}/esptool
|
|
%python_clone -a %{buildroot}%{_bindir}/esp_rfc2217_server
|
|
%python_expand rm -rf %{buildroot}%{$python_sitelib}/__pycache__/*.pyc
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
# there are more tests but upstream runs only those in .travis.yml
|
|
%pytest test/test_imagegen.py
|
|
# requires python-pkcs11 which isn't packaged
|
|
rm -v test/test_espsecure.py test/test_espsecure_hsm.py
|
|
%pytest -m host_test
|
|
|
|
%post
|
|
%python_install_alternative espefuse.py
|
|
%python_install_alternative espsecure.py
|
|
%python_install_alternative esptool.py
|
|
%python_install_alternative esp_rfc2217_server.py
|
|
%python_install_alternative espefuse
|
|
%python_install_alternative espsecure
|
|
%python_install_alternative esptool
|
|
%python_install_alternative esp_rfc2217_server
|
|
|
|
%postun
|
|
%python_uninstall_alternative espefuse.py
|
|
%python_uninstall_alternative espsecure.py
|
|
%python_uninstall_alternative esptool.py
|
|
%python_uninstall_alternative esp_rfc2217_server.py
|
|
%python_uninstall_alternative espefuse
|
|
%python_uninstall_alternative espsecure
|
|
%python_uninstall_alternative esptool
|
|
%python_uninstall_alternative esp_rfc2217_server
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.md
|
|
%python_alternative %{_bindir}/esptool.py
|
|
%python_alternative %{_bindir}/espsecure.py
|
|
%python_alternative %{_bindir}/espefuse.py
|
|
%python_alternative %{_bindir}/esp_rfc2217_server.py
|
|
%python_alternative %{_bindir}/esptool
|
|
%python_alternative %{_bindir}/espsecure
|
|
%python_alternative %{_bindir}/espefuse
|
|
%python_alternative %{_bindir}/esp_rfc2217_server
|
|
%{python_sitelib}/esptool
|
|
%{python_sitelib}/esptool-%{version}.dist-info
|
|
%{python_sitelib}/esp_rfc2217_server
|
|
%{python_sitelib}/espsecure
|
|
%{python_sitelib}/espefuse
|
|
|
|
%changelog
|