From 9a47b328b80e5e502bd67cb94f925efe0c53c755 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 24 Jul 2019 00:43:03 +0800 Subject: [PATCH] do_cmake.sh: specify the supported py versions for different distros there is chance that a distro offer a newer python3 version than the supported one, so we need to avoid using the latest python3 version by specifying the supported python3 Signed-off-by: Kefu Chai --- do_cmake.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/do_cmake.sh b/do_cmake.sh index 8a9a39b8cea0b..2e1593ec2fc85 100755 --- a/do_cmake.sh +++ b/do_cmake.sh @@ -12,13 +12,13 @@ if [ -r /etc/os-release ]; then case "$ID" in fedora) if [ "$VERSION_ID" -ge "29" ] ; then - PYBUILD="3" + PYBUILD="3.7" fi ;; rhel|centos) MAJOR_VER=$(echo "$VERSION_ID" | sed -e 's/\..*$//') if [ "$MAJOR_VER" -ge "8" ] ; then - PYBUILD="3" + PYBUILD="3.6" fi ;; opensuse*|suse|sles) @@ -34,8 +34,8 @@ else exit 1 fi -if [ "$PYBUILD" = "3" ] ; then - ARGS="$ARGS -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3" +if [[ "$PYBUILD" =~ ^3(\..*)?$ ]] ; then + ARGS="$ARGS -DWITH_PYTHON2=OFF -DWITH_PYTHON3=${PYBUILD} -DMGR_PYTHON_VERSION=${PYBUILD}" fi if type ccache > /dev/null 2>&1 ; then -- 2.39.5