Fix python installation for centos 8 stream
This must be python3.8 as we use this version in the integrated repo and require it for ansible 2.12 Change-Id: Ia326d92c24b9cdfcf46011e0661a9b5081e11573
This commit is contained in:
parent
2c762b5daa
commit
ecec4ecca7
@ -44,11 +44,18 @@ BINDEP_FILE=${BINDEP_FILE:-bindep.txt}
|
|||||||
# Perform the initial distribution package install
|
# Perform the initial distribution package install
|
||||||
# to allow pip and bindep to work.
|
# to allow pip and bindep to work.
|
||||||
case "${ID,,}" in
|
case "${ID,,}" in
|
||||||
amzn|centos|rhel|rocky)
|
rocky)
|
||||||
pkg_list="python3-devel python3-virtualenv redhat-lsb-core"
|
pkg_list="python38 python38-devel redhat-lsb-core"
|
||||||
;;
|
;;
|
||||||
fedora)
|
amzn|centos|rhel)
|
||||||
pkg_list="python3-devel python3-virtualenv redhat-lsb-core redhat-rpm-config yum-utils"
|
case ${VERSION_ID} in
|
||||||
|
8)
|
||||||
|
pkg_list="python38 python38-devel redhat-lsb-core"
|
||||||
|
;;
|
||||||
|
9)
|
||||||
|
pkg_list="python3 python3-devel redhat-lsb-core"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
;;
|
;;
|
||||||
ubuntu|debian)
|
ubuntu|debian)
|
||||||
pkg_list="python3-dev python3-pip virtualenv lsb-release curl"
|
pkg_list="python3-dev python3-pip virtualenv lsb-release curl"
|
||||||
@ -64,7 +71,7 @@ eval sudo ${pkg_mgr_cmd} ${pkg_list}
|
|||||||
PIP_EXEC_PATH=$(which pip3 || which pip)
|
PIP_EXEC_PATH=$(which pip3 || which pip)
|
||||||
|
|
||||||
if [[ "${ID,,}" == "centos" ]] && [[ ${VERSION_ID} == "8" ]]; then
|
if [[ "${ID,,}" == "centos" ]] && [[ ${VERSION_ID} == "8" ]]; then
|
||||||
sudo alternatives --set python /usr/bin/python3
|
sudo alternatives --set python3 /usr/bin/python3.8
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install bindep and tox
|
# Install bindep and tox
|
||||||
@ -82,7 +89,7 @@ echo "Packages to install: ${BINDEP_PKGS}"
|
|||||||
# Install OS packages using bindep
|
# Install OS packages using bindep
|
||||||
if [[ ${#BINDEP_PKGS} > 0 ]]; then
|
if [[ ${#BINDEP_PKGS} > 0 ]]; then
|
||||||
case "${ID,,}" in
|
case "${ID,,}" in
|
||||||
centos|fedora)
|
centos|fedora|rhel|rocky)
|
||||||
sudo dnf install -y ${BINDEP_PKGS}
|
sudo dnf install -y ${BINDEP_PKGS}
|
||||||
;;
|
;;
|
||||||
ubuntu|debian)
|
ubuntu|debian)
|
||||||
|
@ -190,10 +190,6 @@ sed -i '/wheel=/d' /tmp/upper-constraints-filtered.txt
|
|||||||
PIP_OPTS+=" --constraint /tmp/upper-constraints-filtered.txt"
|
PIP_OPTS+=" --constraint /tmp/upper-constraints-filtered.txt"
|
||||||
|
|
||||||
source /etc/os-release || source /usr/lib/os-release
|
source /etc/os-release || source /usr/lib/os-release
|
||||||
# Install selinux into venv
|
|
||||||
if [[ ${ID,,} =~ (centos|rhel|fedora) ]]; then
|
|
||||||
PIP_OPTS+=" selinux"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install ARA from PyPi
|
# Install ARA from PyPi
|
||||||
PIP_OPTS+=" ara[server]"
|
PIP_OPTS+=" ara[server]"
|
||||||
|
Loading…
Reference in New Issue
Block a user