Skip to content

Commit

Permalink
add PLUMED hook
Browse files Browse the repository at this point in the history
  • Loading branch information
lara committed Oct 23, 2023
1 parent 6b0bcb9 commit b26dc50
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,22 @@ def pre_configure_hook_wrf_aarch64(self, *args, **kwargs):
raise EasyBuildError("WRF-specific hook triggered for non-WRF easyconfig?!")


def pre_configure_hook_PLUMED_aarch64(self, *args, **kwargs):
"""
pre-configure hook for PLUMED:
- remove unsupported --enable-asmjit option on aarch64
"""

if self.name == 'PLUMED':
if get_cpu_architecture() == AARCH64:
configopts = self.cfg['configopts']
regex = re.compile(r'--enable-asmjit')
if re.search(regex, configopts):
self.cfg['configopts'] = regex.sub('', configopts)
else:
raise EasyBuildError("PLUMED-specific hook triggered for non-PLUMED easyconfig?!")


def pre_test_hook(self,*args, **kwargs):
"""Main pre-test hook: trigger custom functions based on software name."""
if self.name in PRE_TEST_HOOKS:
Expand Down Expand Up @@ -346,6 +362,7 @@ def pre_single_extension_isoband(ext, *args, **kwargs):
'MetaBAT': pre_configure_hook_metabat_filtered_zlib_dep,
'OpenBLAS': pre_configure_hook_openblas_optarch_generic,
'WRF': pre_configure_hook_wrf_aarch64,
'PLUMED': pre_configure_hook_PLUMED_aarch64,
}

PRE_TEST_HOOKS = {
Expand Down

0 comments on commit b26dc50

Please sign in to comment.