build(python): migrate to uv (#5222)

This commit is contained in:
David Lane
2026-05-30 17:37:14 -04:00
committed by GitHub
parent 4e9e0d4c66
commit 0e35140576
14 changed files with 801 additions and 76 deletions

View File

@@ -127,24 +127,24 @@ any of the following paths are modified.
- 'src/**'
```
When testing locally, it may be desirable to manually extract, initialize, update, and compile strings. Python is
required for this, along with the python dependencies in the `./pyproject.toml` file. You can install this with
the following command.
When testing locally, it may be desirable to manually extract, initialize, update, and compile strings. Python and
uv are required for this, along with the Python dependencies in the `./pyproject.toml` file. You can install these
with the following command.
```bash
python -m pip install ".[locale]"
uv sync --only-group locale
```
Additionally, [xgettext](https://www.gnu.org/software/gettext) must be installed.
* Extract, initialize, and update
```bash
python ./scripts/_locale.py --extract --init --update
uv run --no-sync python ./scripts/_locale.py --extract --init --update
```
* Compile
```bash
python ./scripts/_locale.py --compile
uv run --no-sync python ./scripts/_locale.py --compile
```
> [!IMPORTANT]
@@ -166,7 +166,7 @@ find ./ -iname *.cpp -o -iname *.h -iname *.m -iname *.mm | xargs clang-format -
Option 2 (will modify files):
```bash
python ./scripts/update_clang_format.py
uv run --only-group lint python ./scripts/update_clang_format.py
```
#### Unit Testing