Disregard only default compiler requirements for runtimes
This commit is contained in:
parent
e37a7b6c91
commit
29d273d86e
@ -201,11 +201,13 @@ def reject_requirement_constraint(
|
|||||||
if kind != RequirementKind.DEFAULT:
|
if kind != RequirementKind.DEFAULT:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Reject default requirements for runtimes and compilers
|
# Reject requirements with dependencies for runtimes and compilers
|
||||||
if pkg_name in self.runtime_pkgs:
|
# These are usually requests on compilers, in the form of %<compiler>
|
||||||
return True
|
involves_dependencies = bool(constraint.dependencies())
|
||||||
|
if involves_dependencies and (
|
||||||
if pkg_name in self.compiler_pkgs:
|
pkg_name in self.runtime_pkgs or pkg_name in self.compiler_pkgs
|
||||||
|
):
|
||||||
|
tty.debug(f"[{__name__}] Rejecting '{constraint}' for compiler package {pkg_name}")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Requirements under all: are applied only if they are satisfiable considering only
|
# Requirements under all: are applied only if they are satisfiable considering only
|
||||||
@ -216,7 +218,7 @@ def reject_requirement_constraint(
|
|||||||
s.validate_or_raise()
|
s.validate_or_raise()
|
||||||
except spack.error.SpackError as e:
|
except spack.error.SpackError as e:
|
||||||
tty.debug(
|
tty.debug(
|
||||||
f"[SETUP] Rejecting the default '{constraint}' requirement "
|
f"[{__name__}] Rejecting the default '{constraint}' requirement "
|
||||||
f"on '{pkg_name}': {str(e)}",
|
f"on '{pkg_name}': {str(e)}",
|
||||||
level=2,
|
level=2,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user