From b357f56600f2690e93c7fc78630ee482ec6d41f0 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Wed, 20 Mar 2024 11:30:38 +0100 Subject: [PATCH] Set correct min version of tox to be installed Depending on the branch of the OpenStack (requirements repo) different min version of tox should be installed. This patch lowers min version of tox for stable/2023.2 to the tox>=4.5.1 and for stable/2023.1 and stable/zed to tox>=3.28. This change is the same as done in [1] and [2] for the tobiko ansible roles. [1] https://review.opendev.org/c/x/tobiko/+/912718 [2] https://review.opendev.org/c/x/tobiko/+/913742 Closes-Bug: #2058378 Change-Id: I807c2735e1789cfa8b8008156f980b3c208ea6ca --- devstack/plugin.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 394faca..ed67dbc 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -7,11 +7,18 @@ TOBIKO_PLUGIN_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # so let's enable it always when Tobiko is installed KEYSTONE_ADMIN_ENDPOINT=True +TOX_MIN_VERSION="4.13" +if [ "$REQUIREMENTS_BRANCH" == "stable/2023.2" ]; then + TOX_MIN_VERSION="4.5.1" +elif [[ "$REQUIREMENTS_BRANCH" == "stable/2023.1" ]] || [[ "$REQUIREMENTS_BRANCH" == "stable/zed" ]]; then + TOX_MIN_VERSION="3.28" +fi + function install_tobiko_deps { install_python3 git_clone "${TOBIKO_REPO}" "${TOBIKO_DIR}" "${TOBIKO_VERSION}" install_bindep "${TOBIKO_DIR}/bindep.txt" test - pip_install 'tox>=4.13' + pip_install "tox>=${TOX_MIN_VERSION}" }