From: Timo Heister Date: Tue, 14 Nov 2017 19:10:13 +0000 (-0500) Subject: configure PETSc using python2 X-Git-Tag: v8.5.1~9^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b19f09b73d1ad71f04802b7af69c6adbcf4526d8;p=candi.git configure PETSc using python2 --- diff --git a/deal.II-toolchain/packages/petsc.package b/deal.II-toolchain/packages/petsc.package index b0eba72..37373f9 100644 --- a/deal.II-toolchain/packages/petsc.package +++ b/deal.II-toolchain/packages/petsc.package @@ -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