zuul-jobs/roles/ensure-pip
Ian Wienand 372f3af706 Revert "Install venv for all platforms in ensure-pip"
This reverts commit 0aca372814.

This uses the variable ensure_pip_from_upstream_interpreters to
install python-venv packages.

ensure_pip_from_upstream_interpreters is documented as being a list of
python interpreters to run "get-pip.py" with to install pip globally.
This only happens if ensure_pip_from_upstream is set to True.

It's unclear from the original discussion in the change at least, what
this was trying to fix.  It's also unclear why this would skip
packages, and what circumstances that is required in.  It's now
causing more confusion as we try to add fixes ontop of that.

Revert this -- whatever this is doing, we should find the right way to
do it, which isn't this.

Change-Id: Ieada7ec2d2c7320d7aacb9a5dc6de52394c11ed1
2022-06-17 14:52:20 +10:00
..
defaults Pull correct upstream pip version 2022-02-01 08:33:58 -08:00
tasks Revert "Install venv for all platforms in ensure-pip" 2022-06-17 14:52:20 +10:00
README.rst ensure-pip: fix typo in ensure_pip_virtualenv_command documentation 2022-02-28 14:52:30 +11: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.

This role will also install wheel components sufficient to run bdist_wheel builds or pip wheel on a source tree.

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).