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
This commit is contained in:
Dr. Jens Harbott 2020-03-03 10:37:55 +00:00
parent 2134c79dfe
commit e88b96b5fe

View File

@ -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