The type of the python_version variable matters when we interpret it
after yaml deserialization. If it is interpreted as a float then 3.1 ==
3.10 and those python versions are very different. Instead make note
that it should be a string and then update all of the tox jobs to set
this variable as a string.
Change-Id: I55bbc70526a13e6bd4c3c32da8590ad2af76fe7c
The value of python_version is float by default.
The existing comparison will only work for strings.
This commit changes it to work in both cases.
Change-Id: Ib13c33f38b611a38525d2803474b4ae1e05413f7
This commit adds the patch package to the list of python build
dependencies for pyenv. This is not always necessary, but some python
versions (for example 3.7.12) require a patch to be applied before
installing and the process fails if the patch package is not installed.
Change-Id: I605fc1c9255e98692a6a901cfc509b7fdb873ae1
This commit introduces a conditional for RPM package name
when running on a recent CentOS/RHEL system.
Change-Id: I716cc97a8dace02c874d2e39dc90d6a42808ebf6
This commit extends the installation of Python interpreter
from system packages to also support RPM packages (assuming
the playbook is run in an environment with proper repositories).
Also the obsolete note about supporting only Debian distribution
is removed, as the `ensure-python` role already supports other
platforms (via pyenv and stow).
Change-Id: Id6ef8ec3537952348e0a7b233bd26b57613da327
map returns a generator that needs to be converted to a list for
the loop.
We also don't need unique as this is iterating over a list of
directory names that must already be unique.
Change-Id: Ibd22d79be29aaa9d3a7924319c59929e665f9cbc
In case image is prepared with python-stow-versions element,
it make sense to use stow to just enable required python version instead
of building it for each job run.
Change-Id: Ie04a2bb59d351c1e5c79b2da79f7a094c44cdf86
Without this package, you'll get an error similar to this:
ModuleNotFoundError: No module named '_ctypes'
Change-Id: If1b7b66217a33c9001a20449d695cd91dfa2e3c6
In order to install particular python versions on distros that
don't otherwise have them, add an option for installing via
pyenv.
The packages to be installed to allow for Python to be built were
tested on the official Docker containers so they should provide
a fair amount of coverage from a minimal environment.
Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
Change-Id: Ic3312458b499a4b743895fa5829bb25155f77654
While ensure-python has the potential to support more distros,
it currently is limited to Debian based installs. This patch
ensures that, for now, it can only be used for Debian or Ubuntu.
Change-Id: Id02251f211d700d1fdd1fe43d7310b5779c1662d
ensure-python allows for installation of a specific version of
the python interpreter and development files. Add this role to
tox pre.yaml.
Change-Id: Ia56cba58c87aa48de3e8e3f3d28f6252f7dcd7c3