diff --git a/scripts/KlipperScreen-requirements.txt b/scripts/KlipperScreen-requirements.txt index 84f7c3d8..0b39404f 100644 --- a/scripts/KlipperScreen-requirements.txt +++ b/scripts/KlipperScreen-requirements.txt @@ -2,4 +2,4 @@ websocket==0.2.1 requests==2.24.0 vext==0.7.4 websocket-client==0.57.0 -humanize==2.5.0 +humanize==3.1.0 diff --git a/scripts/update-python-venv.sh b/scripts/update-python-venv.sh new file mode 100644 index 00000000..67a7b12b --- /dev/null +++ b/scripts/update-python-venv.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" +KSPATH=$(sed 's/\/scripts//g' <<< $SCRIPTPATH) +KSENV="${HOME}/.KlipperScreen-env" + +update_virtualenv() +{ + echo "Creating virtual environment" + [ ! -d ${KSENV} ] && virtualenv -p /usr/bin/python3 ${KSENV} + + ${KSENV}/bin/pip install -r ${KSPATH}/scripts/KlipperScreen-requirements.txt + ${KSENV}/bin/pip install --no-binary ":all" "vext.gi==0.7.4" + ${KSENV}/bin/vext -e +} + +update_virtualenv