Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,30 @@ def pre_prepare_hook_LAMMPS_kokkos_CUDA_families(self, *args, **kwargs):
updated_cuda_cc = [v.replace('12.0f', '12.0') for v in cuda_cc]
update_build_option('cuda_compute_capabilities', updated_cuda_cc)


def pre_prepare_hook_uv_source_date_epoch(self, *args, **kwargs):
"""
Set SOURCE_DATE_EPOCH for uv builds.

This ensures that maturin uses an explicit timestamp while creating the
wheel rather than relying on the ZIP writer's default timestamp handling.
Otherwise the builds fail on A64FX.
"""
if self.name != 'uv':
raise EasyBuildError(
"uv-specific hook triggered for non-uv easyconfig?!"
)

source_date_epoch = str(int(datetime.datetime.now().timestamp()))

env.setvar('SOURCE_DATE_EPOCH', source_date_epoch)

print_msg(
"Set SOURCE_DATE_EPOCH=%s for %s %s",
source_date_epoch,
self.name,
self.version,
)

def post_prepare_hook_llvm_a64fx(self, *args, **kwargs):
"""
Expand All @@ -1203,7 +1227,6 @@ def pre_configure_hook(self, *args, **kwargs):
if self.name in ['FreeXL', 'libspatialite', 'VSEARCH']:
self.cfg.update('configopts', 'CPPFLAGS="-DOF=_Z_OF ${CPPFLAGS}"')


def pre_configure_hook_BLIS(self, *args, **kwargs):
"""
Pre-configure hook for BLIS
Expand Down Expand Up @@ -2455,6 +2478,7 @@ def post_easyblock_hook(self, *args, **kwargs):
'LLVM': pre_prepare_hook_llvm_a64fx,
'PyTorch': pre_prepare_hook_pytorch,
'Rust': pre_prepare_hook_llvm_a64fx,
'uv': pre_prepare_hook_uv_source_date_epoch,
}

POST_PREPARE_HOOKS = {
Expand Down
Loading