Some distributions are about to switch to Python 3 support only. This means that /usr/bin/python, which is Python 2, is not available anymore. Hence, switch scripts to use Python 3 explicitly.
Not that the PYTHON3 variable might be defined by the Makefile in KDIR already, so depending on which make target is being called it might be defined already. Upstream kernel has the PYTHON3 variable for some time and is now going to move away from pyhton2 as well. Signed-off-by: Florian Bezdeka <[email protected]> --- scripts/include.mk | 4 ++-- tools/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/include.mk b/scripts/include.mk index 028f0ab0..d0139d8e 100644 --- a/scripts/include.mk +++ b/scripts/include.mk @@ -42,8 +42,8 @@ INSTALL_PROGRAM ?= $(INSTALL) INSTALL_DATA ?= $(INSTALL) -m 644 INSTALL_DIR ?= $(INSTALL) -d -m 755 -PYTHON ?= python -PIP := $(PYTHON) -m pip +PYTHON3 ?= python3 +PIP := $(PYTHON3) -m pip ifeq ($(strip $(shell $(PIP) > /dev/null 2> /dev/null && echo "y")), y) PYTHON_PIP_USABLE := yes diff --git a/tools/Makefile b/tools/Makefile index 62585369..4faf9430 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -45,7 +45,7 @@ endif # $(ARCH),x86 always-y := $(BINARIES) HAS_PYTHON_MAKO := \ - $(shell $(PYTHON) -c "from mako.template import Template" 2>/dev/null \ + $(shell $(PYTHON3) -c "from mako.template import Template" 2>/dev/null \ && echo yes) ifeq ($(strip $(HAS_PYTHON_MAKO)), yes) -- 2.31.1 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20210521080211.487380-2-florian.bezdeka%40siemens.com.
