dib-python : handle centos 8

Match on centos 8 and use the inbuilt system python like on RHEL

Change-Id: I81d94481422b4982777160f736dcf463e2fc45d0
This commit is contained in:
Ian Wienand 2019-09-25 01:22:08 +00:00
parent 3bc89edd32
commit 0e230642c5
2 changed files with 2 additions and 4 deletions

View File

@ -10,14 +10,12 @@ if [ -z "${DIB_PYTHON_VERSION:-}" ]; then
if [ "$DIB_RELEASE" -le 22 ]; then
DIB_PYTHON_VERSION=2
fi
elif [ "$DISTRO_NAME" == "centos" ]; then
DIB_PYTHON_VERSION=2
elif [ "$DISTRO_NAME" == "centos7" ]; then
DIB_PYTHON_VERSION=2
elif [ "$DISTRO_NAME" == "rhel7" ]; then
# TODO(nmagnezi): Remove this when the 'rhel7' element gets replaced by 'rhel'
DIB_PYTHON_VERSION=2
elif [ "$DISTRO_NAME" == "rhel" ]; then
elif [[ "$DISTRO_NAME" =~ (rhel|centos) ]]; then
if [ "$DIB_RELEASE" -le 7 ]; then
DIB_PYTHON_VERSION=2
elif [ "$DIB_RELEASE" -ge 8 ]; then

View File

@ -6,7 +6,7 @@ fi
set -eu
set -o pipefail
if [[ ${DISTRO_NAME} == "rhel" && ${DIB_RELEASE} == 8 ]]; then
if [[ ${DISTRO_NAME} =~ (centos|rhel) && ${DIB_RELEASE} == 8 ]]; then
# RHEL8 has a system python, separate from the user python. What
# a good idea, abstracting the python binary for system scripts!
# :) Use it for dib-python.