diff --git a/Custom_Hooks/eb_hooks.py b/Custom_Hooks/eb_hooks.py index 49dcee7756ff3e6b9ebacf8fb34c48cabd29ab48..b0a485fa9e1e4bfaa4ae5b0742096a63cb45d554 100644 --- a/Custom_Hooks/eb_hooks.py +++ b/Custom_Hooks/eb_hooks.py @@ -86,21 +86,20 @@ REQUIRE_MODALTSOFTNAME = { def installation_vetoer(ec): "Check whether this package is NOT supposed to be installed in this system, and abort if necessary" - if os.getenv('CI') is None: - name = ec['name'] - system_name = os.getenv('LMOD_SYSTEM_NAME') - if system_name is None: - with open('/etc/FZJ/systemname') as sn: - system_name = sn.read() - if name in VETOED_INSTALLATIONS[system_name]: - print_warning( - "\nYou are attempting to install software that should not be installed in this system.\n" - "Please double check the list of packages that you are attempting to install. The following\n" - f"packages can't be installed in {system_name}:\n" - ) - for package in VETOED_INSTALLATIONS[system_name]: - print_msg(f"- {package}", stderr=True) - exit(1) + name = ec['name'] + system_name = os.getenv('LMOD_SYSTEM_NAME') + if system_name is None: + with open('/etc/FZJ/systemname') as sn: + system_name = sn.read() + if name in VETOED_INSTALLATIONS[system_name]: + print_warning( + "\nYou are attempting to install software that should not be installed in this system.\n" + "Please double check the list of packages that you are attempting to install. The following\n" + f"packages can't be installed in {system_name}:\n" + ) + for package in VETOED_INSTALLATIONS[system_name]: + print_msg(f"- {package}", stderr=True) + exit(1) def get_user_info(): @@ -205,7 +204,8 @@ def parse_hook(ec, *args, **kwargs): """Custom parse hook to manage installations intended for JSC systems.""" # First of all check if this should be installed - installation_vetoer(ec) + if os.getenv('CI') is None: + installation_vetoer(ec) # Process compiler options ec = inject_compiler_features(ec) @@ -225,7 +225,8 @@ def parse_hook(ec, *args, **kwargs): ec = inject_site_contact_and_user_labels(ec) - ec = tweak_dependencies(ec) + if os.getenv('CI') is None: + ec = tweak_dependencies(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)