Skip to content

Commit a29a48f

Browse files
authored
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
1 parent 935cda7 commit a29a48f

3 files changed

Lines changed: 19 additions & 20 deletions

File tree

.github/workflows/python-build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
pacman-key --init
1818
pacman --noconfirm -Sy archlinux-keyring
1919
pacman --noconfirm -Syyu
20-
pacman --noconfirm -Sy python-pip python-pydantic python-pyparted pkgconfig gcc
21-
- name: Install build dependencies
22-
run: |
23-
python -m pip install --break-system-packages --upgrade pip
24-
pip install --break-system-packages --upgrade build twine wheel setuptools installer
25-
pip uninstall archinstall -y --break-system-packages
20+
pacman --noconfirm -Sy python-uv python-setuptools python-pip
21+
pacman --noconfirm -Sy python-pyparted python-pydantic
22+
- name: Remove existing archinstall (if any)
23+
run:
24+
uv pip uninstall archinstall --break-system-packages --system
2625
- name: Build archinstall
27-
run: python -m build --wheel --no-isolation
26+
run: uv build --no-build-isolation --wheel
2827
- name: Install archinstall
29-
run: python -m installer dist/*.whl
28+
run: |
29+
uv pip install dist/*.whl --break-system-packages --system --no-build --no-deps
3030
- name: Run archinstall
3131
run: |
3232
python -V

.github/workflows/python-publish.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,15 @@ jobs:
1818
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5
1919
with:
2020
python-version: '3.x'
21-
- name: Install dependencies
21+
- name: Prepare arch
2222
run: |
23-
python -m pip install --upgrade pip
24-
pip install build twine
23+
pacman-key --init
24+
pacman --noconfirm -Sy archlinux-keyring
25+
pacman --noconfirm -Syyu
26+
pacman --noconfirm -Sy python-uv python-setuptools python-pip
2527
- name: Build archinstall
2628
run: |
27-
python -m build . --wheel
29+
uv build --no-build-isolation --wheel
2830
- name: Publish archinstall to PyPi
29-
env:
30-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
31-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
3231
run: |
33-
twine upload dist/*
32+
uv publish --trusted-publishing always

build_iso.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ packages=(
1111
pkgconfig
1212
python
1313
python-pip
14-
python-build
14+
python-uv
1515
python-setuptools
16-
python-wheel
1716
python-pyparted
17+
python-pydantic
1818
)
1919

2020
mkdir -p /tmp/archlive/airootfs/root/archinstall-git
@@ -24,8 +24,8 @@ cat <<- _EOF_ | tee /tmp/archlive/airootfs/root/.zprofile
2424
cd archinstall-git
2525
rm -rf dist
2626
27-
python -m build --wheel --no-isolation
28-
pip install dist/archinstall*.whl --break-system-packages
27+
uv build --no-build-isolation --wheel
28+
uv pip install dist/*.whl --break-system-packages --system --no-build --no-deps
2929
3030
echo "This is an unofficial ISO for development and testing of archinstall. No support will be provided."
3131
echo "This ISO was built from Git SHA $GITHUB_SHA"

0 commit comments

Comments
 (0)