@@ -72,36 +72,28 @@ be used for MicroPython. Different uncrustify versions produce slightly
7272different formatting, and the configuration file formats are often
7373incompatible. v0.73 or newer * will not work* .
7474
75- Depending on your operating system version, it may be possible to install a pre-compiled
76- uncrustify version:
75+ Depending on your operating system version, it may be possible to install a
76+ compatible pre-compiled uncrustify version. Otherwise, a compatible version is
77+ available via the PyPI package archive:
7778
78- Ubuntu, Debian
79- --------------
80-
81- Ubuntu versions 21.10 or 22.04LTS, and Debian versions bullseye or bookworm all
82- include v0.72 so can be installed directly:
79+ Pip
80+ ---
8381
8482```
85- $ apt install uncrustify
83+ pip install micropython- uncrustify
8684```
8785
88- Arch Linux
89- ----------
90-
91- The current Arch uncrustify version is too new. There is an [ old Arch package
92- for v0.72] ( https://archive.archlinux.org/packages/u/uncrustify/ ) that can be
93- installed from the Arch Linux archive ([ more
94- information] ( https://wiki.archlinux.org/title/Downgrading_packages#Arch_Linux_Archive ) ). Use
95- the [ IgnorePkg feature] ( https://wiki.archlinux.org/title/Pacman#Skip_package_from_being_upgraded )
96- to prevent it re-updating.
86+ This installs a native compiled uncrustify binary as a Python executable, so it
87+ can be installed into a virtualenv.
9788
98- Brew
89+ Pipx
9990----
10091
101- This command may work, please raise a new Issue if it doesn't:
92+ It's also possible to install via [ pipx] ( https://pipx.pypa.io/ ) if not using a
93+ virtualenv:
10294
10395```
104- curl -L https://github.com/Homebrew/homebrew-core/raw/2b07d8192623365078a8b855a164ebcdf81494a6/Formula/ uncrustify.rb > uncrustify.rb && brew install uncrustify.rb && rm uncrustify.rb
96+ pipx install micropython- uncrustify
10597```
10698
10799Code spell checking
@@ -127,6 +119,9 @@ To have code formatting and commit message conventions automatically checked,
127119a configuration file is provided for the [ pre-commit] ( https://pre-commit.com/ )
128120tool.
129121
122+ Pre-commit will automatically install the correct version of dependencies
123+ such as codespell, uncrustify, etc.
124+
130125First install ` pre-commit ` , either from your system package manager or via
131126` pip ` . When installing ` pre-commit ` via pip, it is recommended to use a
132127virtual environment. Other sources, such as Brew are also available, see
@@ -139,10 +134,6 @@ $ brew install pre-commit # Brew
139134$ pip install pre-commit # PyPI
140135```
141136
142- Next, install [ uncrustify (see above)] ( #uncrustify ) . Other dependencies are managed by
143- pre-commit automatically, but uncrustify needs to be installed and available on
144- the PATH.
145-
146137Then, inside the MicroPython repository, register the git hooks for pre-commit
147138by running:
148139
0 commit comments