From 6e34b65d62f8c282acc51f0bca39f54ce6635bb2 Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Wed, 24 May 2017 10:35:20 -0400 Subject: [PATCH] Support both python2 and python3 virtualenv Now that nodepool support python3, allow our dsvm job to create the appropriate virtualenv for the version of python we'd like to test. Change-Id: Ib573bfcfd367a983d510238f2f6456ffd710a4ab Signed-off-by: Paul Belanger --- devstack/plugin.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 13aef3773..9e0f53ea4 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -61,7 +61,12 @@ function install_glean { # Install nodepool code function install_nodepool { - virtualenv $NODEPOOL_INSTALL + if python3_enabled; then + VENV="virtualenv -p python${PYTHON3_VERSION}" + else + VENV="virtualenv -p python${PYTHON2_VERSION}" + fi + $VENV $NODEPOOL_INSTALL install_shade install_diskimage_builder install_glean