1717 NO_AT_BRIDGE : 1 # Necessary for GTK3 interactive test.
1818 OPENBLAS_NUM_THREADS : 1
1919 PYTHONFAULTHANDLER : 1
20+ # Query PyPI + gitlab riscv64 mirror; pick best compatible wheel.
21+ # `first-index` is wrong here — PyPI has cffi sdist so uv would never check
22+ # gitlab for the riscv64 wheel. `unsafe-best-match` is pip-like and selects
23+ # the riscv64 wheel from gitlab when PyPI lacks one.
24+ UV_EXTRA_INDEX_URL : https://gitlab.com/api/v4/projects/riseproject%2Fpython%2Fwheel_builder/packages/pypi/simple
25+ UV_INDEX_STRATEGY : unsafe-best-match
26+ # Refuse sdist for dependencies — wheels only. Forces uv to pick the gitlab
27+ # riscv64 wheel instead of falling back to building cffi/cryptography/etc.
28+ UV_ONLY_BINARY : ' :all:'
2029
2130jobs :
2231 test :
5362 uses : astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
5463 with :
5564 python-version : ${{ matrix.python-version }}
56- allow-prereleases : true
5765 activate-environment : true
5866 enable-cache : false
5967
@@ -103,15 +111,15 @@ jobs:
103111 sudo apt-get install -yy --no-install-recommends ffmpeg poppler-utils
104112 sudo apt-get install -yy --no-install-recommends libgirepository-2.0-dev
105113
106- - name : Cache pip
114+ - name : Cache uv
107115 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
108116 with :
109- path : ~/.cache/pip
117+ path : ~/.cache/uv
110118 key : |
111- ${{ matrix.os }}-py${{ matrix.python-version }}-pip -${{
119+ ${{ matrix.os }}-py${{ matrix.python-version }}-uv -${{
112120 hashFiles('upstream/pyproject.toml', 'upstream/ci/minver-requirements.txt') }}
113121 restore-keys : |
114- ${{ matrix.os }}-py${{ matrix.python-version }}-pip -
122+ ${{ matrix.os }}-py${{ matrix.python-version }}-uv -
115123 - name : Cache ccache
116124 uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
117125 with :
@@ -136,24 +144,24 @@ jobs:
136144 run : |
137145 # Upgrade pip and setuptools and wheel to get as clean an install as
138146 # possible.
139- python -m pip install --upgrade pip setuptools wheel
147+ uv pip install --upgrade pip setuptools wheel
140148
141149 # Install dependencies from PyPI.
142150 # Preinstall build requirements to enable no-build-isolation builds.
143- python -m pip install --upgrade --prefer-binary \
151+ uv pip install --upgrade --prefer-binary \
144152 --group build --group test
145153
146154 # Install optional dependencies from PyPI.
147155 # Sphinx is needed to run sphinxext tests
148- python -m pip install --upgrade sphinx!=6.1.2
156+ uv pip install --upgrade sphinx!=6.1.2
149157
150158 # GUI toolkits are pip-installable only for some versions of Python
151159 # so don't fail if we can't install them. Make it easier to check
152160 # whether the install was successful by trying to import the toolkit
153161 # (sometimes, the install appears to be successful but shared
154162 # libraries cannot be loaded at runtime, so an actual import is a
155163 # better check).
156- python -m pip install --upgrade pycairo 'cairocffi>=0.8' 'PyGObject' &&
164+ uv pip install --upgrade pycairo 'cairocffi>=0.8' 'PyGObject' &&
157165 (
158166 python -c 'import gi; gi.require_version("Gtk", "4.0"); from gi.repository import Gtk' &&
159167 echo 'PyGObject 4 is available' || echo 'PyGObject 4 is not available'
@@ -163,11 +171,11 @@ jobs:
163171 )
164172
165173 # PyQt5 has no riscv64 wheels; skip.
166- python -mpip install --upgrade --only-binary :all: pyqt6 &&
174+ uv pip install --upgrade --only-binary :all: pyqt6 &&
167175 python -c 'import PyQt6.QtCore' &&
168176 echo 'PyQt6 is available' ||
169177 echo 'PyQt6 is not available'
170- python -mpip install --upgrade --only-binary :all: pyside6 &&
178+ uv pip install --upgrade --only-binary :all: pyside6 &&
171179 python -c 'import PySide6.QtCore' &&
172180 echo 'PySide6 is available' ||
173181 echo 'PySide6 is not available'
@@ -179,7 +187,7 @@ jobs:
179187
180188 export CPPFLAGS='--coverage -fprofile-abs-path'
181189
182- python -m pip install --no-deps --no-build-isolation --verbose \
190+ uv pip install --no-deps --no-build-isolation --verbose \
183191 --config-settings=setup-args="-DrcParams-backend=Agg" \
184192 --editable .[dev]
185193
0 commit comments