zuul-jobs/roles/ensure-pip
Sean McGinnis 09b4be329e
Strip path from default ensure_pip_from_upstream_interpreters
The ensure-pip role has an option to provide multiple interpreters to
use. If not specified, we default to ansible_python.executable. This
default includes the full path to the executable. Those manually
providing which interpreters to use will not know what the full path is,
only the versions they would like to use. To make things consistent,
this strips off the path so we just have the version (python, python3,
python3.8, etc).

Change-Id: I339afc08393e9c6b1d26a05cf13b6fdc151f46d5
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-07-10 11:24:27 -05:00
..
defaults Strip path from default ensure_pip_from_upstream_interpreters 2020-07-10 11:24:27 -05:00
tasks Install venv for all platforms in ensure-pip 2020-07-09 16:02:45 -05:00
README.rst nit: Fix missing word in roles/ensure-pip/README.rst 2020-06-18 13:57:17 +00: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).