Recent release of pip removed support for Python 3.6 [1]
Configure default url for pip, depending on supported
Python version.
[1]: https://pip.pypa.io/en/stable/news/#v22-0
Change-Id: I01faeba1dff864de31b3bbf9ddbe0a4d454fdbe9
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>
When Ansible runs under Python 2, such as on SuSE 15, we need
python2-pip for pip: to work. Update the default to install Python 2
deps when Ansible is running under v2.
Additionally for SuSE, as described inline we can have pip but not
setuptools. Put in a work-around to always pull in the setuptools
package. Pull this out into a separate file; history has shown that
we may need more :/
Change-Id: I450171aad5e31d2925239ab3d0641cd23f6815a2
This role is intended to ensure that the `pip:` module, and jobs that
may wish to use `pip` from the shell, have the necessary requirements.
It is intended as a partial replacement for the pip-and-virtualenv
element in diskimage-builder, which currently pre-installs pip on our
infra CI images during image build.
We wish to remain broady compatible with this element, but not
replicate some of the more problematic areas of its implementation.
By default, this installs the system packages for pip and setuptools
(the latter being a requirement of the Ansible pip module, which
imports it directly, despite pip itself not requiring it).
In this role, we ensure the libraries for the currently running
ansible_python_interpreter version are installed.
There is provision to provide a flag to install the packages directly
from upstream via get-pip.py, although this is not recommended.
Story: #2007386
Task: #39309
Change-Id: Iac2d518a66caf1b801273225f75a0a748412903c