The cleanup includes the following changes:
- The `esptool.py` is no longer installed as a RIOT package, but as a pure Python package, as published by Espressif. The installation takes place in a virtual Python environment in the `dist/tools/esptools/venv` directory.
- The installation of the `esptool.py` is now version-sensitive.
- The `esptool.py` from the Python package is always used.
- The option for users to use a custom `esptool.py` has been removed because newer versions of `esptool.py` use renamed options that are not compatible with older versions of `esptool.py`. Using a custom `esptool.py` therefore makes no sense.
PEP 723 is an accepted proposal to in-line script metadata. One such
use cases is to put script dependencies inside the script, which makes
the requirements.txt redundant [1].
With the correct shebang, it becomes even possible to run the script
directly, without creating a virtual environment and installing
dependencies in advance.
Combining both makes the execution of single-file scripts within RIOT
much easier and friendlier.
PEP 723 metadata can be used by `pipx` [2] and can be easily
installed when `pip` is available.
[1] `pip install` still requires a requirements.txt, which is
generally accepted during development. An open issue exists to
add support for reading dependencies from PEP 723 as well. See
https://github.com/pypa/pip/issues/12891
[2] https://github.com/pypa/pipx
With the migration to #pragma once in the core header in #21405,
the workaround for the header name check when using #include_next
is not necessary anymore and can be dropped.
The headerguard check did not catch the case when a #pragma once
is present in the file followed by classic header guards.
This commit also improves the error messages to give a better
reason why the test failed.
When adding the #pragma once after a comment block, many editors
will remain at the previous indentation level, adding a leading
whitespace to the #pragma once. This is invalid, but causes the
headerguards check to fail. Since it is a common issue, it
warrants a separate check with a proposed solution, just like
for other headerguard issues that are checked.
This adds `STATIC_ANALYSIS` awareness to the ZSH completion, so that
enabling static analysis is made easier for zsh users who use the
completion snippet.
Now that static analysis is supported (for some modules), we need to
add awareness for that flag to compile_commands.py: As the flag is
not supported by LLVM, we strip it off in clangd mode (e.g. for
`make compile-commands`).
Replace elf2uf2 usage with picotool, fix compilation when arm g++ is installed, adjust documentation to new workflow, picotool udev warning (thanks to crasbe)
When sourcing a script, $0 refers to the shell in which the script is running, not the script being sourced. The only way to refer the install script is to specify the full path based on a variable pointing to the RIOT directory.