File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ WEB_SERVICE_NAME="cursed-controls-web.service"
3434UV_BIN=" $INSTALL_HOME /.local/bin/uv"
3535PYTHON_REQUEST=" $( cat " $CC_DIR /.python-version" 2> /dev/null || echo " 3.13" ) "
3636NEED_REBOOT=0
37+ UV_SYNC_INDEX_ARGS=()
3738
3839info () { echo " [cursed-controls] $* " ; }
3940ok () { echo " [cursed-controls] ✓ $* " ; }
@@ -57,6 +58,11 @@ case "$ARCH" in
5758esac
5859BUILD_JOBS=" $( nproc) "
5960[ " $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
6066
6167# ── 2. Show detected hardware (UDC is resolved at runtime via /sys/class/udc) ─
6268MODEL=" $( cat /sys/firmware/devicetree/base/model 2> /dev/null | tr -d ' \0' || echo ' unknown' ) "
@@ -247,7 +253,12 @@ if [ ! -d "$CC_DIR/.venv" ]; then
247253 " $UV_BIN " venv --python " $PYTHON_REQUEST " " $CC_DIR /.venv"
248254fi
249255info " Syncing Python dependencies with uv..."
250- " $UV_BIN " sync --directory " $CC_DIR " --python " $PYTHON_REQUEST " --no-dev --locked
256+ " $UV_BIN " sync \
257+ --directory " $CC_DIR " \
258+ --python " $PYTHON_REQUEST " \
259+ --no-dev \
260+ --locked \
261+ " ${UV_SYNC_INDEX_ARGS[@]} "
251262ok " Python env"
252263
253264# ── 12. Seed default mapping and prepare init script ──────────────────────────
Original file line number Diff line number Diff line change @@ -114,6 +114,13 @@ def test_install_script_uses_uv_for_python_env():
114114 assert "UV_BIN" in install
115115
116116
117+ def test_install_script_uses_piwheels_on_armv6_with_uv ():
118+ install = (REPO_ROOT / "install.sh" ).read_text ()
119+ assert "piwheels.org/simple" in install
120+ assert 'if [ "$ARCH" = "armv6l" ]' in install
121+ assert '--index "piwheels=https://www.piwheels.org/simple"' in install
122+
123+
117124def test_install_script_installs_python_dev_headers ():
118125 install = (REPO_ROOT / "install.sh" ).read_text ()
119126 assert "python3-dev" in install
@@ -130,7 +137,9 @@ def test_install_script_uses_repo_python_version_for_uv():
130137 assert ".python-version" in install
131138 assert "PYTHON_REQUEST" in install
132139 assert '"$UV_BIN" venv --python "$PYTHON_REQUEST"' in install
133- assert '"$UV_BIN" sync --directory "$CC_DIR" --python "$PYTHON_REQUEST"' in install
140+ assert '"$UV_BIN" sync \\ ' in install
141+ assert '--directory "$CC_DIR" \\ ' in install
142+ assert '--python "$PYTHON_REQUEST" \\ ' in install
134143
135144
136145def test_install_script_syncs_submodule_urls ():
You can’t perform that action at this time.
0 commit comments