File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,11 +10,24 @@ echo "Updating BasicSwapDEX" && sleep 1
1010rm -rf $SWAP_DATADIR /basicswap/build
1111
1212# Check and update UV python version
13- if type -p uv; then
13+ detect_os_arch
14+ if [[ $DEBIAN ]]; then
1415 cd $SWAP_DATADIR
15- if uv run python -c " import sys; exit(0 if sys.version_info <= (${py_maj} ,${py_min} ) else 1)" ; then
16+ if ./venv/bin/python -c " import sys; exit(0 if sys.version_info >= (${py_maj} ,${py_min} ) else 1)" ; then
17+ green " Python in the venv is up to date"
18+ else
19+ if ! type -p uv; then
20+ green " Migrating venv to uv"
21+ if ! type -p pipx; then
22+ green " Need to install pipx dependency"
23+ $UPDATE
24+ sudo apt install pipx --no-install-recommends
25+ fi
26+ $PIPX_UV
27+ else
28+ green " Updating uv Python to ${py_maj} .${py_min} "
29+ fi
1630 rm -rf venv
17- green " Updating uv Python to ${py_maj} .${py_min} "
1831 uv venv -p ${py_maj} .${py_min} " ${SWAP_DATADIR} /venv" --seed
1932 fi
2033fi
You can’t perform that action at this time.
0 commit comments