From: Kefu Chai Date: Tue, 23 Jul 2019 16:43:03 +0000 (+0800) Subject: do_cmake.sh: specify the supported py versions for different distros X-Git-Tag: v15.1.0~2099^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a47b328b80e5e502bd67cb94f925efe0c53c755;p=ceph.git 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 --- diff --git a/do_cmake.sh b/do_cmake.sh index 8a9a39b8cea0..2e1593ec2fc8 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