[build-system] requires = ["setuptools>=77"] build-backend = "setuptools.build_meta" [project] name = "esptool" authors = [ {name = "Fredrik Ahlberg (themadinventor)"}, {name = "Angus Gratton (projectgus)"}, {name = "Espressif Systems"} ] readme = {file = "README.md", content-type = "text/markdown"} license = "GPL-2.0-or-later" license-files = ["LICENSE"] description = "A serial utility for flashing, provisioning, and interacting with Espressif SoCs." classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", "Topic :: Software Development :: Embedded Systems", "Environment :: Console", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.15", ] requires-python = ">=3.10" dynamic = ["version", "scripts"] dependencies = [ "cryptography>=43.0.0", "pyserial>=3.3", "reedsolo>=1.5.3,<1.8", "PyYAML>=5.1", "intelhex", "rich_click<2", "click<9", "esp-pylib[ide,serial,cli]>=1.0.0", ] [project.urls] Homepage = "https://github.com/espressif/esptool/" Documentation = "https://docs.espressif.com/projects/esptool/" Source = "https://github.com/espressif/esptool/" Tracker = "https://github.com/espressif/esptool/issues/" Changelog = "https://github.com/espressif/esptool/blob/master/CHANGELOG.md" [project.optional-dependencies] dev = [ "pyelftools", "coverage~=6.0", "pre-commit", "pytest", "pytest-rerunfailures", "requests", "czespressif", ] hsm = ["python-pkcs11"] docs = [ "esp-docs>=2.1.4,<3", "sphinx-tabs", ] [tool.setuptools] include-package-data = true [tool.setuptools.package-data] "*" = ["esptool/targets/stub_flasher/1/*", "esptool/targets/stub_flasher/2/*"] [tool.setuptools.packages] find = {exclude = ["ci*", "test*", "docs*"]} [tool.setuptools.dynamic] version = {attr = "esptool.__init__.__version__"} [tool.commitizen] name = "czespressif" version = "5.6.0" update_changelog_on_bump = true tag_format = "v$version" changelog_start_rev = "v4.2.1" changelog_merge_prerelease = true annotated_tag = true bump_message = "change: Update version to $new_version" version_files = [ "esptool/__init__.py:__version__" ] [tool.codespell] skip = '*.bin,*.json,*test/images/efuse/*,*docs/en/espefuse/inc/*' ignore-words-list = 'bloc,ser,dout,exten,fpt' write-changes = false [tool.mypy] disallow_incomplete_defs = false # Disallows defining functions with incomplete type annotations disallow_untyped_defs = false # Disallows defining functions without type annotations or with incomplete type annotations ignore_missing_imports = true # Suppress error messages about imports that cannot be resolved python_version = "3.10" # Specifies the Python version used to parse and check the target program warn_no_return = true # Shows errors for missing return statements on some execution paths warn_return_any = true # Shows a warning when returning a value with type Any from a function declared with a non- Any return type [tool.ruff] # https://docs.astral.sh/ruff/settings/ # Exclude a variety of commonly ignored directories. exclude = [ ".eggs", ".git", "__pycache__" ] line-length = 88 target-version = "py310" [tool.ruff.lint] # Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default. # Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or # McCabe complexity (`C901`) by default. # Also enable pyupgrade (`UP`) rules for Python modernization, except UP032 # UP032: Use f-string instead of .format() call - excluded to avoid automatic conversion select = ['E', 'F', 'W', 'UP', 'I', 'TID251'] ignore = ["E203", "UP032"] # Allow fix for all enabled rules (when `--fix`) is provided. fixable = ["ALL"] unfixable = [] # Allow unused variables when underscore-prefixed. dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$" [tool.ruff.lint.flake8-tidy-imports.banned-api] "bitstring".msg = "Use espefuse.efuse.bitstring; upstream bitstring is not a dependency." [tool.ruff.lint.per-file-ignores] # tests often manipulate sys.path before importing the main tools, so ignore import order violations "test/*.py" = ["E402"] # multiple spaces after ',' and long lines - used for visual layout of eFuse data "espefuse/efuse/*/mem_definition.py" = ["E241", "E501"] "espefuse/efuse/*/operations.py" = ["E241", "E501", "F401"] "espefuse/efuse/*/fields.py" = ["E241", "E501"] # ignore long lines - used for RS encoding pairs "test/test_modules.py" = ["E501"] # don't check for unused imports in __init__.py files "__init__.py" = ["F401"] # allow definition from star imports in docs config "docs/conf_common.py" = ["F405"] [tool.ruff.format] quote-style = "double" indent-style = "space" docstring-code-format = true [tool.pytest.ini_options] addopts = "-sv --junitxml=test/report.xml --color=yes"