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

@@ -14,6 +14,7 @@ on:
env:
FILE: ./locale/sunshine.po
PYTHON_VERSION: '3.14'
jobs:
localize:
@@ -28,12 +29,19 @@ jobs:
- name: Install Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Python Dependencies
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: Sync Python tools
run: |
python -m pip install --upgrade pip setuptools
python -m pip install ".[locale]"
uv sync --locked --only-group locale \
--python "${PYTHON_VERSION}" \
--no-python-downloads \
--no-install-project
- name: Set up xgettext
run: |
@@ -54,7 +62,7 @@ jobs:
echo "NEW_FILE=${new_file}" >> "${GITHUB_ENV}"
# extract the new strings
python ./scripts/_locale.py --extract
uv run --locked --no-sync python ./scripts/_locale.py --extract
- name: git diff
if: env.NEW_FILE == 'false'