]> https://gitweb.dealii.org/ - candi.git/commitdiff
configure PETSc using python2 60/head
authorTimo Heister <timo.heister@gmail.com>
Tue, 14 Nov 2017 19:10:13 +0000 (14:10 -0500)
committerTimo Heister <timo.heister@gmail.com>
Tue, 14 Nov 2017 19:10:13 +0000 (14:10 -0500)
deal.II-toolchain/packages/petsc.package

index b0eba727639f990c9658ff577823be88ece8cd48..37373f99cd17f37ec5c8ebe1c2e82fcdf8ecf99f 100644 (file)
@@ -14,6 +14,19 @@ BUILDCHAIN=custom
 
 INSTALL_PATH=${INSTALL_PATH}/${EXTRACTSTO}
 
+# Note that PETSc ./configure currently does not support python3, but some
+# distros might ship with python3 as the default "python".  So select python2
+# or python2.7 if available, otherwise use python or what the user supplied in
+# PYTHON_INTERPRETER.
+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
+default PYTHON_INTERPRETER="python"
+
+
 #########################################################################
 
 CONFOPTS="
@@ -76,7 +89,7 @@ package_specific_setup () {
     # make sure no other invalid PETSC_DIR is set:
     unset PETSC_DIR
     
-    ./configure --prefix=${INSTALL_PATH} ${CONFOPTS}
+    ${PYTHON_INTERPRETER} ./configure --prefix=${INSTALL_PATH} ${CONFOPTS}
     quit_if_fail "petsc ./configure failed"
     
     make all install

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.