From: Timo Heister Date: Thu, 20 Apr 2023 01:32:20 +0000 (-0400) Subject: switch to python3 by default X-Git-Tag: v9.5.1-r1~15^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e44b28fdd9e5096d320e95904323769df0647d0;p=candi.git switch to python3 by default --- diff --git a/candi.sh b/candi.sh index b798c4e..6d0c2a3 100755 --- a/candi.sh +++ b/candi.sh @@ -1012,17 +1012,20 @@ cecho ${GOOD} "Platform: ${PLATFORM}" echo -# Figure out what binary to use for python support. Note that older PETSc ./configure only supports python2. For now, prefer -# using python2 but use what the user supplies as PYTHON_INTERPRETER. +# Figure out what binary to use for python support. Prefer +# using python3 but use what the user supplies as PYTHON_INTERPRETER. +if builtin command -v python3 --version > /dev/null; then + default PYTHON_INTERPRETER="python3" +fi +if builtin command -v python --version > /dev/null; then + default PYTHON_INTERPRETER="python" +fi if builtin command -v python2 --version > /dev/null; then default PYTHON_INTERPRETER="python2" fi if builtin command -v python2.7 --version > /dev/null; then default PYTHON_INTERPRETER="python2.7" fi -if builtin command -v python3 --version > /dev/null; then - default PYTHON_INTERPRETER="python3" -fi default PYTHON_INTERPRETER="python" # Figure out the version of the existing python: