2018-10-11 16:38:23 +00:00
|
|
|
Ensure specified python interpreter and development files are installed
|
|
|
|
|
2020-09-13 11:30:54 +00:00
|
|
|
There are three ways to install the python interpreter:
|
|
|
|
|
|
|
|
1. Using distribution packages: This is the default (``python_use_pyenv`` and
|
2022-01-18 14:55:00 +00:00
|
|
|
``python_use_stow`` are both ``false``).
|
2020-09-13 11:30:54 +00:00
|
|
|
|
|
|
|
2. Install using ``pyenv``.
|
|
|
|
|
|
|
|
3. Install using ``stow``.
|
|
|
|
|
|
|
|
.. note:: You cannot use both ``pyenv`` and ``stow`` method for the same job.
|
|
|
|
That means that ``python_use_pyenv`` and ``python_use_stow``
|
|
|
|
cannot be set both to ``True`` at the same time.
|
|
|
|
|
2018-10-11 16:38:23 +00:00
|
|
|
**Role Variables**
|
|
|
|
|
|
|
|
.. zuul:rolevar:: python_version
|
2022-05-04 21:09:56 +00:00
|
|
|
:type: str
|
2018-10-11 16:38:23 +00:00
|
|
|
|
2020-09-13 11:30:54 +00:00
|
|
|
Optional version of python interpreter to install, such as ``3.7``.
|
2022-05-04 21:09:56 +00:00
|
|
|
Note that you should use a string value for this variable rather than
|
|
|
|
a float. This avoids problems with 3.10 being evaluated as 3.1.
|
2020-01-27 02:13:26 +00:00
|
|
|
|
|
|
|
.. zuul:rolevar:: python_use_pyenv
|
2022-05-04 21:09:56 +00:00
|
|
|
:type: bool
|
2020-04-15 01:26:45 +00:00
|
|
|
:default: False
|
2020-01-27 02:13:26 +00:00
|
|
|
|
2020-09-13 11:30:54 +00:00
|
|
|
Whether to optionally use ``pyenv`` to install python instead of distro
|
2020-04-15 01:26:45 +00:00
|
|
|
packages.
|
2020-09-13 11:30:54 +00:00
|
|
|
|
|
|
|
.. zuul:rolevar:: python_use_stow
|
2022-05-04 21:09:56 +00:00
|
|
|
:type: bool
|
2020-09-13 11:30:54 +00:00
|
|
|
:default: False
|
|
|
|
|
|
|
|
In case you have image with already prepared python versions, for example used the
|
|
|
|
python-stow-versions element, you can activate them with stow utility
|
|
|
|
by setting this variable to ``true``.
|
|
|
|
|
|
|
|
.. zuul:rolevar:: python_stow_dir
|
2022-05-04 21:09:56 +00:00
|
|
|
:type: str
|
2020-09-13 11:30:54 +00:00
|
|
|
:default: /usr/local/stow
|
|
|
|
|
|
|
|
Sets the target directory for stow. This should be the path to the
|
|
|
|
directory where prepared python packages are located.
|