Swapping to python-uv for building and distribution (#3407)

* Swapping to python-uv for building archinstall

* Tweaked UV parameters to not use a venv

* Tweaking uv to not resolve/install any dependencies during installation.

* Added remaining dependencies to the build runner

* Swapped to uv for publishing, using pypi 'trusted publisher' instead of token access

* Installing uv and dependencies for publishing

* Swapped to uv in the building of the test ISO
This commit is contained in:
Anton Hvornum 2025-04-26 11:55:19 +02:00 committed by GitHub
parent 935cda7a05
commit a29a48f452
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 20 deletions

View File

@ -17,16 +17,16 @@ jobs:
pacman-key --init pacman-key --init
pacman --noconfirm -Sy archlinux-keyring pacman --noconfirm -Sy archlinux-keyring
pacman --noconfirm -Syyu pacman --noconfirm -Syyu
pacman --noconfirm -Sy python-pip python-pydantic python-pyparted pkgconfig gcc pacman --noconfirm -Sy python-uv python-setuptools python-pip
- name: Install build dependencies pacman --noconfirm -Sy python-pyparted python-pydantic
run: | - name: Remove existing archinstall (if any)
python -m pip install --break-system-packages --upgrade pip run:
pip install --break-system-packages --upgrade build twine wheel setuptools installer uv pip uninstall archinstall --break-system-packages --system
pip uninstall archinstall -y --break-system-packages
- name: Build archinstall - name: Build archinstall
run: python -m build --wheel --no-isolation run: uv build --no-build-isolation --wheel
- name: Install archinstall - name: Install archinstall
run: python -m installer dist/*.whl run: |
uv pip install dist/*.whl --break-system-packages --system --no-build --no-deps
- name: Run archinstall - name: Run archinstall
run: | run: |
python -V python -V

View File

@ -18,16 +18,15 @@ jobs:
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5 uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5
with: with:
python-version: '3.x' python-version: '3.x'
- name: Install dependencies - name: Prepare arch
run: | run: |
python -m pip install --upgrade pip pacman-key --init
pip install build twine pacman --noconfirm -Sy archlinux-keyring
pacman --noconfirm -Syyu
pacman --noconfirm -Sy python-uv python-setuptools python-pip
- name: Build archinstall - name: Build archinstall
run: | run: |
python -m build . --wheel uv build --no-build-isolation --wheel
- name: Publish archinstall to PyPi - name: Publish archinstall to PyPi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: | run: |
twine upload dist/* uv publish --trusted-publishing always

View File

@ -11,10 +11,10 @@ packages=(
pkgconfig pkgconfig
python python
python-pip python-pip
python-build python-uv
python-setuptools python-setuptools
python-wheel
python-pyparted python-pyparted
python-pydantic
) )
mkdir -p /tmp/archlive/airootfs/root/archinstall-git mkdir -p /tmp/archlive/airootfs/root/archinstall-git
@ -24,8 +24,8 @@ cat <<- _EOF_ | tee /tmp/archlive/airootfs/root/.zprofile
cd archinstall-git cd archinstall-git
rm -rf dist rm -rf dist
python -m build --wheel --no-isolation uv build --no-build-isolation --wheel
pip install dist/archinstall*.whl --break-system-packages uv pip install dist/*.whl --break-system-packages --system --no-build --no-deps
echo "This is an unofficial ISO for development and testing of archinstall. No support will be provided." echo "This is an unofficial ISO for development and testing of archinstall. No support will be provided."
echo "This ISO was built from Git SHA $GITHUB_SHA" echo "This ISO was built from Git SHA $GITHUB_SHA"