allow @ instead of @= in external compilers

This commit is contained in:
Gregory Becker
2024-01-26 13:03:15 -08:00
parent 7a174666e8
commit 4c3d9ca525
2 changed files with 3 additions and 2 deletions

View File

@@ -157,8 +157,9 @@ def _compiler_config_from_package_config(config):
def _compiler_config_from_external(config):
spec = spack.spec.Spec(config["spec"])
# use str(spec.versions) to allow `@x.y.z` instead of `@=x.y.z`
compiler_spec = spack.spec.CompilerSpec(
package_name_to_compiler_name.get(spec.name, spec.name), spec.version
package_name_to_compiler_name.get(spec.name, spec.name), str(spec.versions)
)
extra_attributes = config.get("extra_attributes", {})

View File

@@ -300,7 +300,7 @@ def test_compilers_shows_packages_yaml_minimal(no_compilers_yaml, working_env, c
gcc_entry = {
"externals": [
{
"spec": "gcc@=7.7.7",
"spec": "gcc@7.7.7",
"prefix": str(compilers_dir),
"modules": ["gcc/7.7.7", "foobar"],
"extra_attributes": {"flags": {"fflags": "-ffree-form"}},