From f031f2a67935ba150f1dc20a3f46de1930da7a86 Mon Sep 17 00:00:00 2001 From: matham Date: Fri, 16 Oct 2020 12:44:30 -0400 Subject: [PATCH] Try python3 first as python may point to python2. (#7157) --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index bb7f29e05..3969c91f8 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ -ifeq (, $(shell which python )) + +PYTHON = python3 +ifeq (, $(shell which $(PYTHON) 2> /dev/null )) + PYTHON := python +endif + +ifeq (, $(shell which $(PYTHON) 2> /dev/null)) $(error "PYTHON=$(PYTHON) not found in $(PATH)") endif -PYTHON = python PYTHON_VERSION_MIN=3.0 PYTHON_VERSION=$(shell $(PYTHON) -c 'import sys; print("%d.%d"% sys.version_info[0:2])' ) PYTHON_VERSION_OK=$(shell $(PYTHON) -c 'import sys;\