diff --git a/do_cmake.sh b/do_cmake.sh index 67f2299100152..6178c17f1d092 100755 --- a/do_cmake.sh +++ b/do_cmake.sh @@ -5,6 +5,28 @@ if test -e build; then exit 1 fi +PYBUILD="2" +source /etc/os-release +case "$ID" in + fedora) + if [ "$VERSION_ID" -ge "29" ] ; then + PYBUILD="3" + fi + ;; + rhel|centos) + MAJOR_VER=$(echo "$VERSION_ID" | sed -e 's/\..*$//') + if [ "$MAJOR_VER" -ge "8" ] ; then + PYBUILD="3" + fi + ;; + opensuse*|suse|sles) + PYBUILD="3" + ;; +esac +if [ "$PYBUILD" = "3" ] ; then + ARGS="$ARGS -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3" +fi + if type ccache > /dev/null 2>&1 ; then echo "enabling ccache" ARGS="$ARGS -DWITH_CCACHE=ON" diff --git a/run-make-check.sh b/run-make-check.sh index a3a50dfd58390..aa08cb31d6d0a 100755 --- a/run-make-check.sh +++ b/run-make-check.sh @@ -111,9 +111,6 @@ function run() { test "$BUILD_MAKEOPTS" && echo "make will run with option(s) $BUILD_MAKEOPTS" CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS} CMAKE_BUILD_OPTS="-DWITH_GTEST_PARALLEL=ON -DWITH_FIO=ON -DWITH_SEASTAR=ON" - if ! type python2 > /dev/null 2>&1 ; then - CMAKE_BUILD_OPTS+=" -DWITH_PYTHON2=OFF -DWITH_PYTHON3=ON -DMGR_PYTHON_VERSION=3" - fi CMAKE_BUILD_OPTS+=$(detect_ceph_dev_pkgs) cat <