cd "${BASE_DIR}"
BASE_DIR=$( readlink -f . )
-declare -a VALID_PY_VERSIONS=("3.10" "3.9" "3.8" "3.7" "3.6")
+declare -a VALID_PY_VERSIONS=("3.11." "3.10" "3.9" "3.8" "3.7" "3.6")
PIP_OPTIONS=
export VIRTUAL_ENV_DISABLE_PROMPT=y
+PYTHON_MINOR_VERSION=
+
#-------------------------------------------------------------------
detect_color() {
# shellcheck disable=SC1091
. venv/bin/activate || exit 5
+ PYTHON_MINOR_VERSION=$( python3 -c 'import sys; print(sys.version_info.minor)' )
}
#------------------------------------------------------------------------------
pip install ${PIP_OPTIONS} --upgrade --upgrade-strategy eager --requirement requirements-lint.txt
empty_line
fi
+
+ if [[ -f requirements-backports-3.9.txt && -n "${PYTHON_MINOR_VERSION}" && "${PYTHON_MINOR_VERSION}" -lt 9 ]] ; then
+ info "Installing modules necessary for Python <3.9 …"
+ empty_line
+ pip install ${PIP_OPTIONS} --upgrade --upgrade-strategy eager --requirement requirements-backports-3.9.txt
+ empty_line
+ fi
+
}
#------------------------------------------------------------------------------