Skip to content

Commit 22268d7

Browse files
committed
fix: uv pinning version fixes for pi wheels
1 parent 1552a92 commit 22268d7

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

install.sh

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ WEB_SERVICE_NAME="cursed-controls-web.service"
3434
UV_BIN="$INSTALL_HOME/.local/bin/uv"
3535
PYTHON_REQUEST="$(cat "$CC_DIR/.python-version" 2>/dev/null || echo "3.13")"
3636
NEED_REBOOT=0
37-
UV_SYNC_INDEX_ARGS=()
3837

3938
info() { echo "[cursed-controls] $*"; }
4039
ok() { echo "[cursed-controls] ✓ $*"; }
@@ -58,11 +57,6 @@ case "$ARCH" in
5857
esac
5958
BUILD_JOBS="$(nproc)"
6059
[ "$BUILD_JOBS" -gt 4 ] && BUILD_JOBS=4
61-
if [ "$ARCH" = "armv6l" ]; then
62-
UV_SYNC_INDEX_ARGS=(
63-
--index "piwheels=https://www.piwheels.org/simple"
64-
)
65-
fi
6660

6761
# ── 2. Show detected hardware (UDC is resolved at runtime via /sys/class/udc) ─
6862
MODEL="$(cat /sys/firmware/devicetree/base/model 2>/dev/null | tr -d '\0' || echo 'unknown')"
@@ -252,13 +246,21 @@ if [ ! -d "$CC_DIR/.venv" ]; then
252246
info "Creating Python env with uv..."
253247
"$UV_BIN" venv --python "$PYTHON_REQUEST" "$CC_DIR/.venv"
254248
fi
249+
if [ "$ARCH" = "armv6l" ]; then
250+
info "Preinstalling wheel-backed ARMv6 packages from piwheels..."
251+
"$UV_BIN" pip install \
252+
--python "$CC_DIR/.venv/bin/python" \
253+
--index-url https://www.piwheels.org/simple \
254+
evdev==1.9.2 \
255+
PyYAML==6.0.3 \
256+
pydantic-core==2.41.4
257+
fi
255258
info "Syncing Python dependencies with uv..."
256259
"$UV_BIN" sync \
257260
--directory "$CC_DIR" \
258261
--python "$PYTHON_REQUEST" \
259262
--no-dev \
260-
--locked \
261-
"${UV_SYNC_INDEX_ARGS[@]}"
263+
--locked
262264
ok "Python env"
263265

264266
# ── 12. Seed default mapping and prepare init script ──────────────────────────

tests/test_install_assets.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,12 @@ def test_install_script_uses_piwheels_on_armv6_with_uv():
118118
install = (REPO_ROOT / "install.sh").read_text()
119119
assert "piwheels.org/simple" in install
120120
assert 'if [ "$ARCH" = "armv6l" ]' in install
121-
assert '--index "piwheels=https://www.piwheels.org/simple"' in install
121+
assert '"$UV_BIN" pip install \\' in install
122+
assert '--python "$CC_DIR/.venv/bin/python" \\' in install
123+
assert '--index-url https://www.piwheels.org/simple' in install
124+
assert "evdev==1.9.2" in install
125+
assert "PyYAML==6.0.3" in install
126+
assert "pydantic-core==2.41.4" in install
122127

123128

124129
def test_install_script_installs_python_dev_headers():

0 commit comments

Comments
 (0)