From 0aca37281458b94b30fd124f885cadc18ad3c61e Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Fri, 3 Jul 2020 13:09:53 -0500 Subject: [PATCH] Install venv for all platforms in ensure-pip The ensure-pip tasks will install python3-venv, but multiple interpreters may be specified. This adds handling to make sure the venv package is installed for all requested interpreters. Change-Id: I670d5815bfc902f9c50a98df715ef60b61bab594 Signed-off-by: Sean McGinnis --- roles/ensure-pip/tasks/Debian.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/ensure-pip/tasks/Debian.yaml b/roles/ensure-pip/tasks/Debian.yaml index b108d7013..5ddd46dd1 100644 --- a/roles/ensure-pip/tasks/Debian.yaml +++ b/roles/ensure-pip/tasks/Debian.yaml @@ -12,6 +12,15 @@ - python3-wheel become: yes +# Debian packages venv separately, so make sure we are installing it for +# all requested versions +- name: Install venv for all versions + package: + name: "{{ ensure_pip_from_upstream_interpreters | product(['-venv']) | map('join') | list }}" + become: yes + # Be flexible in case the platform doesn't have the requested package + ignore_errors: yes + - name: Install Python 2 pip package: name: