Skip to content

Commit

Permalink
do_cmake.sh: specify the supported py versions for different distros
Browse files Browse the repository at this point in the history
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 <kchai@redhat.com>
  • Loading branch information
tchaikov committed Jul 23, 2019
1 parent 1e33464 commit 9a47b32
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions do_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 9a47b32

Please sign in to comment.