From 406ab2f331555cfcf320fe2a77949d7f8af7ab32 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Mon, 26 Aug 2019 11:58:32 -0400 Subject: configure: more resilient Python version capture The current approach to capture the Python version is fragile, as it was demonstrated by a very specific build of Python 3 on Fedora 29 that, under non-interactive shells would print multiline version information. The (badly) stripped version output would be sent to config-host.mak, producing bad syntax and rendering the makefiles unusable. Now, the Python versions is printed by configure, but only a simple (and better controlled variable) indicating whether the build system is using Python 2 is kept on config-host.mak. Signed-off-by: Cleber Rosa Message-Id: <20190826155832.17427-1-crosa@redhat.com> Reviewed-by: Tony Nguyen Signed-off-by: Eduardo Habkost --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/Makefile.include b/tests/Makefile.include index 49684fd..f5ac095 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1135,7 +1135,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results AVOCADO_SHOW=app AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET_DIRS))) -ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2) +ifneq ($(PYTHON2),y) $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(call quiet-command, \ $(PYTHON) -m venv --system-site-packages $@, \ -- cgit v1.1