Pin importlib-resources to fix virtualenv and tox

Work around this bug [0] via downgrade of importlib-resources.

Note that we skip the base-test phase because this task is set to not
fail. If we have problems we should be able to debug live.

[0] https://gitlab.com/python-devs/importlib_resources/issues/83

Change-Id: Ia8bbcbc734bc7fe3d7e553e51d67a4ed0ae1404e
This commit is contained in:
Clark Boylan 2020-03-02 11:00:33 -08:00
parent 2433993b70
commit 2134c79dfe

View File

@ -46,3 +46,19 @@
- mirror-info
- role: configure-mirrors
set_apt_mirrors_trusted: True
post_tasks:
- name: Pin importlib-resources to 1.0.2 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
else
# Centos 7 shouldnt have python3 by default and need a pip2 install
pip install --upgrade importlib-resources==1.0.2
fi
args:
executable: /bin/bash
# Do our best but if we fail don't cause job to fail as it may run
# happily without virtualenv or tox.
failed_when: false