From 08c53fa405e1b162dc1af3ec9a51372c4c0e812d Mon Sep 17 00:00:00 2001 From: Wouter Deconinck Date: Mon, 20 Jan 2025 06:50:29 -0600 Subject: [PATCH] pythia8: correct with_or_without prefix for +openmpi (#48131) * pythia8: correct with_or_without prefix for +openmpi * pythia8: fix style * pythia8: fix style --- var/spack/repos/builtin/packages/pythia8/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/pythia8/package.py b/var/spack/repos/builtin/packages/pythia8/package.py index 22cbb2c9490..9c4ca7c3a8e 100644 --- a/var/spack/repos/builtin/packages/pythia8/package.py +++ b/var/spack/repos/builtin/packages/pythia8/package.py @@ -179,7 +179,9 @@ def configure_args(self): args.append("--with-yoda=" + self.spec["yoda"].prefix) args += self.with_or_without("python", activation_value="prefix") - args += self.with_or_without("openmp", activation_value="prefix", variant="openmpi") + args += self.with_or_without( + "openmp", activation_value=lambda x: self.spec["openmpi"].prefix, variant="openmpi" + ) args += self.with_or_without("mpich", activation_value="prefix") args += self.with_or_without("hdf5", activation_value="prefix")