From c23955183817724ee55e18bc168a746d94720ee0 Mon Sep 17 00:00:00 2001 From: AlexanderRichert-NOAA Date: Thu, 1 Aug 2024 02:34:11 +0000 Subject: [PATCH] allow compilers with version in matrix defs --- spack-ext/lib/jcsda-emc/spack-stack/stack/stack_env.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spack-ext/lib/jcsda-emc/spack-stack/stack/stack_env.py b/spack-ext/lib/jcsda-emc/spack-stack/stack/stack_env.py index 85b701839..83757629a 100644 --- a/spack-ext/lib/jcsda-emc/spack-stack/stack/stack_env.py +++ b/spack-ext/lib/jcsda-emc/spack-stack/stack/stack_env.py @@ -260,14 +260,10 @@ def write(self): # DH I am too stupid to do this the "spack way" ... definitions = spack.config.get("definitions", scope=env_scope) if definitions: - target_compiler = f"%{self.compiler}".split("@")[0] + target_compiler = f"%{self.compiler}" for i in range(len(definitions)): if "compilers" in definitions[i]: - j = len(definitions[i]["compilers"])-1 - while j>=0: - if not definitions[i]["compilers"][j] == target_compiler: - definitions[i]["compilers"].pop(j) - j -= 1 + definitions[i] = {"compilers": [target_compiler]} spack.config.set("definitions", definitions, scope=env_scope) if self.install_prefix: