Skip to content

Commit

Permalink
Merge pull request #47 from TiTidom-RC/dev
Browse files Browse the repository at this point in the history
Add python version check for venv in install script
  • Loading branch information
TiTidom-RC authored Oct 25, 2024
2 parents 7695a4f + 184b91c commit bd6a7dd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions resources/install_apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,20 @@ if [ "$versionPython" -lt 11 ]; then
# PYENV_ROOT="${PYENV_DIR}" ${PYENV_DIR}/bin/pyenv install -s 3.11 | log
PYENV_ROOT="${PYENV_DIR}" ${PYENV_DIR}/bin/pyenv install -s ${PYTHON_VERSION} | log
log "** Python ${PYTHON_VERSION} Installation :: Done **"

echo 52 > ${PROGRESS_FILE}
log "*****************************************"
log "* Check Versions : Python PyEnv vs Venv *"
log "*****************************************"
VENV_PYTHON_VERSION=$(${VENV_DIR}/bin/python3 --version 2>/dev/null | awk '{print $2}')
[[ -z "$VENV_PYTHON_VERSION" ]] && VENV_PYTHON_VERSION="None"
log "** Python Versions :: PyEnv = ${PYTHON_VERSION} / Venv = ${VENV_PYTHON_VERSION} **"
if [ "$PYTHON_VERSION" = "$VENV_PYTHON_VERSION" ]; then
log "** Python Versions Match :: OK **"
else
log "** Python Versions Mismatch :: NEED UPDATE **"
VenvToUpdate=1
fi
else
log "*********************"
log "* PyEnv Environment *"
Expand Down

0 comments on commit bd6a7dd

Please sign in to comment.