Commit eb37b989 authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

Allow pip to be installed in Suse SLE 15.6

In Suse SLE 15.6, ansible can be installed either from the OpenSuse
repo of from PackageHub.

The version installed from OpenSuse requires Python >= 3.10.
Thus, it depends on the modern Python (version 3.11) provided by the
Python 3 module, instead of on the Python provided by the base system
module (version 3.6).
Packages installed for the modern Python, such as pip, will have
python311 as a prefix instead of just Python.

On the other hand, the ansible version in PackageHub is older and
can be used with the older Python version.

Thus, we check if either version of the package is installed, and if
not we install the more modern from those available.
parent 12536cbb
......@@ -55,7 +55,10 @@ is_package_installed unzip || install_package unzip
is_package_installed openssl || install_package openssl
is_package_installed ansible || install_package ansible
if ! is_ubuntu || [[ $DISTRO = wheezy || $DISTRO == jessie || $DISTRO == stretch || $DISTRO == xenial || $DISTRO == bionic ]]; then
if [[ $DISTRO = sle15.6 ]]; then
is_package_installed python311-pip || is_package_installed python3-pip || install_package python311-pip || install_package python3-pip
pip3 install --upgrade pip
elif ! is_ubuntu || [[ $DISTRO = wheezy || $DISTRO == jessie || $DISTRO == stretch || $DISTRO == xenial || $DISTRO == bionic ]]; then
is_package_installed python-pip || install_package python-pip
pip install --upgrade "pip < 21.0"
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment