diff --git a/Custom_Hooks/eb_hooks.py b/Custom_Hooks/eb_hooks.py index d22b53ee2430577a376d8b281abe5ebd7868a787..9cbe59156b9ce41bf307b6809470fd4ec37b0c6b 100644 --- a/Custom_Hooks/eb_hooks.py +++ b/Custom_Hooks/eb_hooks.py @@ -236,6 +236,8 @@ def parse_hook(ec, *args, **kwargs): ec = tweak_moduleclass(ec) + ec = tweak_module_conflict_side_compilers(ec) + # If we are parsing we are not searching, in this case if the easyconfig is # located in the search path, warn that it's dependencies will (most probably) # not be resolved @@ -295,6 +297,21 @@ def tweak_moduleclass(ec): return ec +def tweak_module_conflict_side_compilers(ec): + if ec['name'] in SIDECOMPILERS: + key = "modluafooter" + value = 'conflict(%s)' % ','.join('"'+x+'"' for x in SIDECOMPILERS) + if key in ec_dict: + if not value in ec_dict[key]: + ec[key] = "\n".join([ec_dict[key], value]) + else: + ec[key] = value + ec.log.info( + "[parse hook] Injecting Lmod conflict property for SIDECOMPILERS") + + return ec + + def inject_site_contact_and_user_labels(ec): ec_dict = ec.asdict() # Check where installations are going to go and add appropriate site contact