do_cmake.sh: refactor code to set PYBUILD

so it is more consistent with rhel/centos part.

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2021-06-07 17:49:24 +08:00
parent cf8814d316
commit e7597405c3

View File

@ -19,11 +19,12 @@ if [ -r /etc/os-release ]; then
source /etc/os-release
case "$ID" in
fedora)
PYBUILD="3.7"
if [ "$VERSION_ID" -eq "32" ] ; then
PYBUILD="3.8"
elif [ "$VERSION_ID" -ge "33" ] ; then
PYBUILD="3.9"
if [ "$VERSION_ID" -ge "33" ] ; then
PYBUILD="3.9"
elif [ "$VERSION_ID" -ge "32" ] ; then
PYBUILD="3.8"
else
PYBUILD="3.7"
fi
;;
rhel|centos)