--- /dev/null
+---
+features:
+ - |
+ Post-build script capture-instance-metadata.sh will attempt to choose the
+ best possible version of Python to use. If the ``$PYTHON`` variable is set,
+ this will be used. If not, we check to see if ``python3`` is available,
+ as this should point to the latest version. If this is also not available,
+ we run with the basic ``python`` command.
# shellcheck disable=SC1090
source ~/lf-env.sh
-lf-activate-venv --python python3.8 lftools
+if [[ "${PYTHON:-}" -ne "" ]]; then
+ lf-activate-venv --python $PYTHON lftools
+elif python3; then
+ lf-activate-venv --python python3 lftools
+else
+ lf-activate-venv lftools
+fi
# detect if we're in EC2
if [ -n "${NOMAD_DC}" ]; then