Merge "Allow PYTHON_EXEC_PATH in bootstrap-ansible"

This commit is contained in:
Jenkins 2017-07-31 16:45:44 +00:00 committed by Gerrit Code Review
commit e5ec0cb0b8

View File

@ -72,7 +72,7 @@ case ${DISTRO_ID} in
python-minimal python-dev \
python3 python3-dev \
libssl-dev libffi-dev \
python3-apt
python-apt python3-apt
;;
esac
@ -86,7 +86,7 @@ elif [ -n "$HTTP_PROXY" ]; then
fi
# Figure out the version of python is being used
PYTHON_EXEC_PATH="$(which python3 || which python2 || which python)"
PYTHON_EXEC_PATH="${PYTHON_EXEC_PATH:-$(which python3 || which python2 || which python)}"
PYTHON_VERSION="$($PYTHON_EXEC_PATH -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')"
# Use https when Python with native SNI support is available