]> https://gitweb.dealii.org/ - candi.git/commitdiff
switch to python3 by default 344/head
authorTimo Heister <timo.heister@gmail.com>
Thu, 20 Apr 2023 01:32:20 +0000 (21:32 -0400)
committerTimo Heister <timo.heister@gmail.com>
Sat, 22 Apr 2023 14:46:00 +0000 (10:46 -0400)
candi.sh

index b798c4e2731057830d295eaeb58da89069c63692..6d0c2a3c48a4f3f4aa1c04f57314ca71256fa0cc 100755 (executable)
--- 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:

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.