]> git.proxmox.com Git - mirror_qemu.git/commitdiff
check-venv: use recorded Python version
authorCleber Rosa <crosa@redhat.com>
Fri, 9 Nov 2018 15:07:08 +0000 (10:07 -0500)
committerEduardo Habkost <ehabkost@redhat.com>
Thu, 17 Jan 2019 19:52:40 +0000 (17:52 -0200)
The current approach works fine, but it runs Python on every make
command (even if it's not related to the venv usage).

This is just an optimization, and not a change of behavior.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20181109150710.31085-3-crosa@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
tests/Makefile.include

index f403a6571d9dae888e715aed72345637567fd9a0..f8d4399293546251e29919ec42eae3d8f13fa953 100644 (file)
@@ -958,8 +958,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results
 # information please refer to "avocado --help".
 AVOCADO_SHOW=none
 
-PYTHON3 = $(shell $(PYTHON) -c 'import sys; print(1 if sys.version_info >= (3, 0) else 0)')
-ifeq ($(PYTHON3), 1)
+ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2)
 $(TESTS_VENV_DIR): $(TESTS_VENV_REQ)
        $(call quiet-command, \
             $(PYTHON) -m venv --system-site-packages $@, \