Fix python3 version for rpm distros

pythonX.Y version is virtually provided since long[1], and
pythonXY-devel no longer provided in latest CentOS and Fedora
releases.
So switching to use pythonX.Y-devel as that will also pull pythonX.Y
as a dependency.

Additionally install pythonX.Y-pip as for rpm distros it don't install
pip via source.

[1] 75005c20f6

Change-Id: I990586cce876533c67e3da4c97d9e5995c762340
This commit is contained in:
2025-04-09 18:14:00 +05:30
parent 608ae718fc
commit f41a16c118

View File

@@ -489,11 +489,7 @@ function install_python3 {
if is_ubuntu; then
apt_get install python${PYTHON3_VERSION} python${PYTHON3_VERSION}-dev
elif is_fedora; then
if [ "$os_VENDOR" = "Fedora" ]; then
install_package python${PYTHON3_VERSION//.}
else
install_package python${PYTHON3_VERSION//.} python${PYTHON3_VERSION//.}-devel
fi
install_package python${PYTHON3_VERSION}-devel python${PYTHON3_VERSION}-pip
fi
}