Try python3 first as python may point to python2. (#7157)

This commit is contained in:
matham 2020-10-16 12:44:30 -04:00 committed by GitHub
parent 4315d2d817
commit f031f2a679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -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;\