Ian Wienand bbb149ebf9 ensure-pip: always check for python3-venv on Debuntu
As explained inline, we can have systems where pip is installed, but
python3-venv isn't.

This role is assuming that "python3 -m venv --help" indicates that you
will be able to create a working venv with this command, but this is
unfortunately incorrect.  On Debuntu this requires the python3-venv
package as well.  Put in an unconditional probe for this in the
workarounds, and install it if required.

Change-Id: Iaa3ecd05b64af6dd9b2ee17a39bcbe6cde8686ba
2020-05-11 11:10:04 +10:00
..
2020-04-17 10:45:26 +02:00

Ensure pip is available

This role is intended install the requirements for the pip module on hosts.

Jobs that also wish to call pip via shell commands directly can also use this to ensure pip is available. However, it should be noted that calling pip is ambiguous when supporting many platforms. On some platforms it may install the package under the Python 2 interpreter and in others Python 3. You should use a qualified name (pip2 or pip3) to avoid confusion.

Role Variables

Output Variables

This variable will be set to a command appropriate for general usage with the pip module virtualenv_command argument on the host. On Python 3 hosts this will be the inbuilt venv module, on Python 2 hosts the virtualenv package will be installed (this is avoided on Python 3 hosts as an unnecessary dependency).