[buildcore] Fix Python 3 detection to work if python command missing

This commit is contained in:
Gary Talent 2022-05-21 16:21:24 -05:00
parent f2ddd15d63
commit bab9776fe4

View File

@ -24,10 +24,12 @@ ifneq ($(shell which docker 2> /dev/null),)
endif endif
endif endif
ifneq ($(shell which python3 2> /dev/null),)
PYTHON3=python3
else
ifeq ($(shell ${ENV_RUN} python -c 'import sys; print(sys.version_info[0])'),3) ifeq ($(shell ${ENV_RUN} python -c 'import sys; print(sys.version_info[0])'),3)
PYTHON3=python PYTHON3=python
else endif
PYTHON3=python3
endif endif
SCRIPTS=${BUILDCORE_PATH}/scripts SCRIPTS=${BUILDCORE_PATH}/scripts