From bab9776fe4d8b586822343003b7eba11c88c0c6e Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 21 May 2022 16:21:24 -0500 Subject: [PATCH] [buildcore] Fix Python 3 detection to work if python command missing --- deps/buildcore/base.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/deps/buildcore/base.mk b/deps/buildcore/base.mk index 5e4d10be..b9cb26f3 100644 --- a/deps/buildcore/base.mk +++ b/deps/buildcore/base.mk @@ -24,10 +24,12 @@ ifneq ($(shell which docker 2> /dev/null),) endif endif -ifeq ($(shell ${ENV_RUN} python -c 'import sys; print(sys.version_info[0])'),3) - PYTHON3=python -else +ifneq ($(shell which python3 2> /dev/null),) PYTHON3=python3 +else + ifeq ($(shell ${ENV_RUN} python -c 'import sys; print(sys.version_info[0])'),3) + PYTHON3=python + endif endif SCRIPTS=${BUILDCORE_PATH}/scripts