From 7e1832457760107f0b12a932e0647264b0650157 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Mon, 14 May 2018 00:55:40 +0200 Subject: [PATCH] Fix SLEPc package --- deal.II-toolchain/packages/slepc.package | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/deal.II-toolchain/packages/slepc.package b/deal.II-toolchain/packages/slepc.package index 20cf378..ed45fb8 100644 --- a/deal.II-toolchain/packages/slepc.package +++ b/deal.II-toolchain/packages/slepc.package @@ -12,6 +12,21 @@ BUILDCHAIN=custom INSTALL_PATH=${INSTALL_PATH}/${NAME} +# Note that SLEPc ./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" + + +############################################################################## + if [ -z "${PETSC_DIR}" ]; then cecho ${BAD} "slepc: error petsc variable PETSC_DIR not found." exit 1 @@ -24,7 +39,7 @@ package_specific_setup () { # make sure no other invalid SLEPC_DIR is set: unset SLEPC_DIR - ./configure --prefix=${INSTALL_PATH} ${CONFOPTS} + ${PYTHON_INTERPRETER} ./configure --prefix=${INSTALL_PATH} ${CONFOPTS} quit_if_fail "slepc ./configure failed" make SLEPC_DIR=$PWD PETSC_DIR=${PETSC_DIR} all install -- 2.39.5