From 3146c9393fdde4a233cfb168ff7a606fa1d326cc Mon Sep 17 00:00:00 2001 From: Richard Top Date: Wed, 19 Aug 2026 13:54:42 +0200 Subject: [PATCH 1/2] Add pre-single-extension hook for hf-xet on aarch64/generic --- eb_hooks.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 3cd66af8..b6bbc3f2 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1960,9 +1960,14 @@ def pre_single_extension_hf_xet(ext, *args, **kwargs): if ext.name in ['hf_xet', 'hf-xet'] and ext.version in ['1.1.7', '1.2.0']: cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if cpu_target == CPU_TARGET_AARCH64_GENERIC: - sed_cmd = ( + if ext.version == '1.1.7': + sed_cmd = ( r"""sed -i '/^sha2 = / s/, features = \["asm"\]//' data/Cargo.toml && """ - ) + ) + else: + sed_cmd = ( + r"""sed -i '/^sha2 = / s/, features = \["asm"\]//' ../data/Cargo.toml && """ + ) ext.cfg['preinstallopts'] = sed_cmd + ext.cfg.get('preinstallopts', '') ext.log.info("Injected data/Cargo.toml sha2 asm patch into preinstallopts for hf_xet on %s", cpu_target) else: @@ -2422,6 +2427,7 @@ def post_easyblock_hook(self, *args, **kwargs): 'numpy': pre_single_extension_numpy, 'testthat': pre_single_extension_testthat, 'hf_xet': pre_single_extension_hf_xet, + 'hf-xet': pre_single_extension_hf_xet, } POST_SINGLE_EXTENSION_HOOKS = { From 075fbc85a97bd0b02064271ed10785a4379a63cd Mon Sep 17 00:00:00 2001 From: Richard Top Date: Wed, 19 Aug 2026 17:28:45 +0200 Subject: [PATCH 2/2] Applied suggestions --- eb_hooks.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index b6bbc3f2..7be81faf 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1961,13 +1961,9 @@ def pre_single_extension_hf_xet(ext, *args, **kwargs): cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if cpu_target == CPU_TARGET_AARCH64_GENERIC: if ext.version == '1.1.7': - sed_cmd = ( - r"""sed -i '/^sha2 = / s/, features = \["asm"\]//' data/Cargo.toml && """ - ) - else: - sed_cmd = ( - r"""sed -i '/^sha2 = / s/, features = \["asm"\]//' ../data/Cargo.toml && """ - ) + sed_cmd = r"""sed -i '/^sha2 = / s/, features = \["asm"\]//' data/Cargo.toml && """ + elif ext.version == '1.2.0': + sed_cmd = r"""sed -i '/^sha2 = / s/, features = \["asm"\]//' ../data/Cargo.toml && """ ext.cfg['preinstallopts'] = sed_cmd + ext.cfg.get('preinstallopts', '') ext.log.info("Injected data/Cargo.toml sha2 asm patch into preinstallopts for hf_xet on %s", cpu_target) else: