[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] xen/build: Automatically locate a suitable python interpreter
commit c8a8645f1efe967f7d50e224cffe8282ec7df640 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Sat Dec 7 15:50:22 2019 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Tue Dec 10 17:23:39 2019 +0000 xen/build: Automatically locate a suitable python interpreter Needing to pass PYTHON=python3 into hypervisor builds is irritating and unnecessary. Locate a suitable interpreter automatically, defaulting to Py3 if it is available. Reported-by: Steven Haigh <netwiz@xxxxxxxxx> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx> Release-acked-by: Juergen Gross <jgross@xxxxxxxx> --- xen/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/Makefile b/xen/Makefile index 949ca6eb03..f36a5bc6c0 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -13,6 +13,11 @@ export XEN_BUILD_TIME ?= $(shell LC_ALL=C date +%T) export XEN_BUILD_HOST ?= $(shell hostname) export XEN_CONFIG_EXPERT ?= n +# Best effort attempt to find a python interpreter, defaulting to Python 3 if +# available. Fall back to just `python` if `which` is nowhere to be found. +PYTHON_INTERPRETER := $(word 1,$(shell which python3 python python2 2>/dev/null) python) +export PYTHON ?= $(PYTHON_INTERPRETER) + export BASEDIR := $(CURDIR) export XEN_ROOT := $(BASEDIR)/.. -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |