0aca372814
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 <sean.mcginnis@gmail.com>
32 lines
759 B
YAML
32 lines
759 B
YAML
- name: Update package lists
|
|
apt:
|
|
update_cache: true
|
|
become: yes
|
|
|
|
- name: Install Python 3 pip
|
|
package:
|
|
name:
|
|
- python3-pip
|
|
- python3-setuptools
|
|
- python3-venv
|
|
- 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:
|
|
- python-setuptools
|
|
- python-pip
|
|
- python-wheel
|
|
become: yes
|
|
when: ensure_pip_from_packages_with_python2
|