diff --git a/repos/hlrs/packages/mpip/enable-python2-python3.patch b/repos/hlrs/packages/mpip/enable-python2-python3.patch new file mode 100644 index 0000000..659f80d --- /dev/null +++ b/repos/hlrs/packages/mpip/enable-python2-python3.patch @@ -0,0 +1,56 @@ +--- mpiP-3.5/configure 2020-10-22 01:55:22.000000000 +0200 ++++ spack-src/configure 2024-06-14 16:38:45.496623714 +0200 +@@ -3420,8 +3420,10 @@ + AR=ar + fi + +-# Extract the first word of "python", so it can be a program name with args. +-set dummy python; ac_word=$2 ++for ac_prog in python python3 python2 ++do ++ # Extract the first word of "$ac_prog", so it can be a program name with args. ++set dummy $ac_prog; ac_word=$2 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } + if ${ac_cv_prog_HAVE_PYTHON+:} false; then : +@@ -3437,7 +3439,7 @@ + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then +- ac_cv_prog_HAVE_PYTHON="python" ++ ac_cv_prog_HAVE_PYTHON="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +@@ -3445,7 +3447,6 @@ + done + IFS=$as_save_IFS + +- test -z "$ac_cv_prog_HAVE_PYTHON" && ac_cv_prog_HAVE_PYTHON="no" + fi + fi + HAVE_PYTHON=$ac_cv_prog_HAVE_PYTHON +@@ -3458,10 +3459,15 @@ + fi + + ++ test -n "$HAVE_PYTHON" && break ++done ++test -n "$HAVE_PYTHON" || HAVE_PYTHON="no" ++ + if test "x$HAVE_PYTHON" == "xno" ; then + as_fn_error $? "Python is required to build mpiP." "$LINENO" 5 + fi + ++ + TEST_LIST= + + # Test for available compilers +@@ -7604,6 +7610,7 @@ + echo " C compiler : ${CC}" + echo " C++ compiler : ${CXX}" + echo " Fortran compiler : ${F77}" ++echo " Python : ${HAVE_PYTHON}" + echo + echo " Timer : ${TIMER_NAME}" + echo " Stack Unwinding : ${UNWIND_WITH}" diff --git a/repos/hlrs/packages/mpip/package.py b/repos/hlrs/packages/mpip/package.py index c7628f0..a81591e 100644 --- a/repos/hlrs/packages/mpip/package.py +++ b/repos/hlrs/packages/mpip/package.py @@ -16,7 +16,7 @@ class Mpip(AutotoolsPackage): license("Unlicense") - version("master", branch="master") + version("main", branch="main") version("3.5", sha256="e366843d53fa016fb03903e51c8aac901aa5155edabe64698a8d6fa618a03bbd") variant("demangling", default=True, description="Build with demangling support") @@ -62,6 +62,15 @@ class Mpip(AutotoolsPackage): # '+setjmp' adds '--disable-libunwind' to the confiure args depends_on("unwind", when="+libunwind ~setjmp") + # patch to find python3 or python2 for mpip@3.5 + patch("enable-python2-python3.patch", when="@3.5") + #patch("https://github.com/LLNL/mpiP/commit/8485ec75bb2465a8c23cbc0c435d28b879b19631.patch", + # sha256="c3ce232cae65336151fd956cfb10f54c86ed762603e30b8eeaa89eff83df3efa", + # when="@3.5") + patch("https://github.com/LLNL/mpiP/pull/41/commits/5db0838604a9de6037b808f3011bda46aa0911dc.patch", + sha256="ac21423015a4ca80ccd1d2ce50b2c32cf74e936e1511996cd73f62dc00cfc4e1", + when="@3.5") + def configure_args(self): spec = self.spec