From 349ff33b6e90306d86fd425b5fa81b715872614d Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Thu, 29 Jul 2021 02:59:59 -0500 Subject: [PATCH] [buildcore] Remove duplicate defines and add extra detection for Python 3 --- base.mk | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/base.mk b/base.mk index a38d47e..685b25c 100644 --- a/base.mk +++ b/base.mk @@ -16,13 +16,15 @@ else HOST_ENV=${OS}-$(shell uname -m) endif +ifeq ($(shell python -c 'import sys; print(sys.version_info[0])'),3) + PYTHON3=python +else + PYTHON3=python3 +endif + SCRIPTS=${BUILDCORE_PATH}/scripts -SETUP_BUILD=python3 ${SCRIPTS}/setup-build.py -PYBB=python3 ${SCRIPTS}/pybb.py -CMAKE_BUILD=${PYBB} cmake-build -RM_RF=${PYBB} rm -SETUP_BUILD=python3 ${SCRIPTS}/setup-build.py -PYBB=python3 ${SCRIPTS}/pybb.py +SETUP_BUILD=${PYTHON3} ${SCRIPTS}/setup-build.py +PYBB=${PYTHON3} ${SCRIPTS}/pybb.py CMAKE_BUILD=${PYBB} cmake-build RM_RF=${PYBB} rm ifdef USE_VCPKG