zuul-jobs/roles/ensure-pip
Ian Wienand f578a38693 ensure-pip : fix Xenial exported virtualenv command
This is a fix for Id8347b6b09735659a7ed9bbe7f9d2798fbec9620 which did
not specify the full path in ensure_pip_virtualenv_command for Xenial.

This slipped by testing because there we check
ensure_pip_virtualenv_command runs under a shell:, but not when called
as the argument to the pip: module (which exec's it differently and
requires the full path).  Update testing to do that too.

Change-Id: I65ff5ce913917079ab2fc1d88c56d1c0a24ea83e
2020-05-06 11:15:00 +10:00
..
defaults ensure-pip: use python2-pip when running under Python 2 2020-05-05 09:27:24 +10:00
tasks ensure-pip : fix Xenial exported virtualenv command 2020-05-06 11:15:00 +10:00
README.rst Python roles: misc doc updates 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).