xtest: Allow to specify the python interpreter
Explicitly use the interpreter when invoking python scripts
(i.e. scripts/file_to_c.py and scripts/rsp_to_gcm.py).
Previously, the default interpreter was used when the scripts
were called. Now, the interpreter is explicitly specified which
would hence override the default interpreter being used.
For android and makefile builds, $(PYTHON3) would be used.
On the other hand, for CMAKE based builds, the path to the
python interpreter is populated in the "Python_EXECUTABLE" variable
via the python package.
How it is helpful:
More explicit control over the version of python interpreters
that needs to be used.
Signed-off-by: Sadiq Hussain <sadiq.muchumarri@intel.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
diff --git a/scripts/common.mk b/scripts/common.mk
index 103a415..fb5eb3e 100644
--- a/scripts/common.mk
+++ b/scripts/common.mk
@@ -7,3 +7,5 @@
$(eval _o := $(patsubst %/,%,$(patsubst %/.,%,$(1))))$(if \
$(filter-out $(1),$(_o)),$(call strip-trailing-slashes-and-dots,$(_o)),$(_o))
endef
+
+PYTHON3 ?= python3