Fix usage of python in mpip recipe
This commit is contained in:
parent
aaf96a7521
commit
4dc102438b
2 changed files with 66 additions and 1 deletions
56
repos/hlrs/packages/mpip/enable-python2-python3.patch
Normal file
56
repos/hlrs/packages/mpip/enable-python2-python3.patch
Normal file
|
@ -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}"
|
|
@ -16,7 +16,7 @@ class Mpip(AutotoolsPackage):
|
||||||
|
|
||||||
license("Unlicense")
|
license("Unlicense")
|
||||||
|
|
||||||
version("master", branch="master")
|
version("main", branch="main")
|
||||||
version("3.5", sha256="e366843d53fa016fb03903e51c8aac901aa5155edabe64698a8d6fa618a03bbd")
|
version("3.5", sha256="e366843d53fa016fb03903e51c8aac901aa5155edabe64698a8d6fa618a03bbd")
|
||||||
|
|
||||||
variant("demangling", default=True, description="Build with demangling support")
|
variant("demangling", default=True, description="Build with demangling support")
|
||||||
|
@ -62,6 +62,15 @@ class Mpip(AutotoolsPackage):
|
||||||
# '+setjmp' adds '--disable-libunwind' to the confiure args
|
# '+setjmp' adds '--disable-libunwind' to the confiure args
|
||||||
depends_on("unwind", when="+libunwind ~setjmp")
|
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):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue