From e88b96b5feba26cbdfa349cd788a53985d4b409a Mon Sep 17 00:00:00 2001 From: "Dr. Jens Harbott" Date: Tue, 3 Mar 2020 10:37:55 +0000 Subject: [PATCH] Pin virtualenv in order to fix tox on py27 In addition to the bug for which [0] is a workaround, there is another issue with virtualenv [1,2], so we need to temporarily pin its version, too. [0] Ia8bbcbc734bc7fe3d7e553e51d67a4ed0ae1404e [1] https://github.com/pypa/virtualenv/issues/1670 [2] https://github.com/pypa/virtualenv/pull/1673 Change-Id: I0a4ce2d259675fa7f1d6069a318bc8e8a98b0850 --- playbooks/base/pre.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/playbooks/base/pre.yaml b/playbooks/base/pre.yaml index 9d8be66..c07f83d 100644 --- a/playbooks/base/pre.yaml +++ b/playbooks/base/pre.yaml @@ -47,15 +47,17 @@ - role: configure-mirrors set_apt_mirrors_trusted: True post_tasks: - - name: Pin importlib-resources to 1.0.2 to fix Virtualenv and Tox + - name: | + Pin importlib-resources to 1.0.2 and virtualenv to 20.0.5 in order + to fix Virtualenv and Tox become: yes shell: | if type -p pip3 ; then # Tox and virtualenv will be python3 installed on platforms with pip3 - pip3 install --upgrade importlib-resources==1.0.2 + pip3 install --upgrade importlib-resources==1.0.2 virtualenv==20.0.5 else # Centos 7 shouldnt have python3 by default and need a pip2 install - pip install --upgrade importlib-resources==1.0.2 + pip install --upgrade importlib-resources==1.0.2 virtualenv==20.0.5 fi args: executable: /bin/bash