Skip to content
Snippets Groups Projects
Commit 92566b15 authored by Sebastian Achilles's avatar Sebastian Achilles
Browse files

update EB hooks: add Perl and Python tweaks

parent 10ca6763
No related branches found
No related tags found
No related merge requests found
......@@ -72,14 +72,14 @@ VETOED_INSTALLATIONS = {
TWEAKABLE_DEPENDENCIES = {
'UCX': 'default',
'CUDA': '11.5',
'Mesa': ('OpenGL', '2021b'),
'libglvnd': ('OpenGL', '2021b'),
'libxc': '5.1.7',
'glu': ('OpenGL', '2021b'),
'glew': ('OpenGL', '2021b'),
'Boost': '1.78.0',
'Boost.Python': '1.78.0',
#'CUDA': '11.5',
'Mesa': ('OpenGL', '2022a'),
'libglvnd': ('OpenGL', '2022a'),
#'libxc': '5.1.7',
'glu': ('OpenGL', '2022a'),
'glew': ('OpenGL', '2022a'),
#'Boost': '1.78.0',
#'Boost.Python': '1.78.0',
}
SIDECOMPILERS = ['AOCC', 'Clang']
......@@ -233,6 +233,12 @@ def parse_hook(ec, *args, **kwargs):
# Process UCX options
ec = inject_ucx_tweaks(ec)
# Process Perl module
ec = inject_perl_tweaks(ec)
# Process Python module
ec = inject_python_tweaks(ec)
# Change module name if applicable
ec = inject_modaltsoftname(ec)
......@@ -484,6 +490,48 @@ def inject_compiler_tweaks(ec):
return ec
def inject_perl_tweaks(ec):
# Perl require to load Perl-JSC-extra
ec_dict = ec.asdict()
if ec.name in 'Perl' and install_path().lower().startswith('/p/software'):
key = "modluafooter"
value = '''
if mode()=="load" then
try_load("Perl-JSC-extra")
end
'''
if key in ec_dict:
if not value in ec_dict[key]:
ec[key] = "\n".join([ec[key], value])
else:
ec[key] = value
ec.log.info(
"[parse hook] Injecting Perl-JSC-extra loading")
return ec
def inject_python_tweaks(ec):
# Python require to load Python-JSC-extra
ec_dict = ec.asdict()
if ec.name in 'Python' and install_path().lower().startswith('/p/software'):
key = "modluafooter"
value = '''
if mode()=="load" then
try_load("Python-JSC-extra")
end
'''
if key in ec_dict:
if not value in ec_dict[key]:
ec[key] = "\n".join([ec[key], value])
else:
ec[key] = value
ec.log.info(
"[parse hook] Injecting Python-JSC-extra loading")
return ec
def pre_ready_hook(self, *args, **kwargs):
"When we are building something, do some checks for bad behaviour"
ec = self.cfg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment