From c54a263fb718c5f7fa06869db8dc856c1aa258a5 Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Tue, 9 Jun 2026 09:56:23 +0000 Subject: [PATCH] update: migrate old debian-like installs to uv --- bsx/update.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/bsx/update.sh b/bsx/update.sh index 30b95df..b1aef20 100755 --- a/bsx/update.sh +++ b/bsx/update.sh @@ -10,11 +10,24 @@ echo "Updating BasicSwapDEX" && sleep 1 rm -rf $SWAP_DATADIR/basicswap/build # Check and update UV python version -if type -p uv; then +detect_os_arch +if [[ $DEBIAN ]]; then cd $SWAP_DATADIR - if uv run python -c "import sys; exit(0 if sys.version_info <= (${py_maj},${py_min}) else 1)"; then + if ./venv/bin/python -c "import sys; exit(0 if sys.version_info >= (${py_maj},${py_min}) else 1)"; then + green "Python in the venv is up to date" + else + if ! type -p uv; then + green "Migrating venv to uv" + if ! type -p pipx; then + green "Need to install pipx dependency" + $UPDATE + sudo apt install pipx --no-install-recommends + fi + $PIPX_UV + else + green "Updating uv Python to ${py_maj}.${py_min}" + fi rm -rf venv - green "Updating uv Python to ${py_maj}.${py_min}" uv venv -p ${py_maj}.${py_min} "${SWAP_DATADIR}/venv" --seed fi fi