Skip to content

Commit

Permalink
Added Nim hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Top committed Nov 25, 2024
1 parent 578cc83 commit d3761f4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,21 @@ def parse_hook_grpcio_zlib(ec, ecprefix):
original_option = "GRPC_PYTHON_BUILD_SYSTEM_ZLIB=True"
new_option = "GRPC_PYTHON_BUILD_SYSTEM_ZLIB=False"
(exts_list[0][2])['preinstallopts'] = original_preinstallopts.replace(original_option, new_option, 1)
print_msg("Modified the easyconfig to use compat ZLIB with GRPC_PYTHON_BUILD_SYSTEM_ZLIB=False")
print_msg("Modified the easyconfig to use compat ZLIB with GRPC_PYTHON_B:UILD_SYSTEM_ZLIB=False")
else:
raise EasyBuildError("grpcio-specific hook triggered for a non-grpcio easyconfig?!")


def parse_hook_Nim_add_XDG_CACHE_HOME(ec, ecprefix):
"""Add XDG_CACHE_HOME to modextravars in the easyconfig to avoid The :File name too long """
tmpdir = '/tmp'
if ec.name == 'Nim':
ec['modextravars']['XDG_CACHE_HOME'] = tmpdir
print_msg("Added XDG_CACHE_HOME='%s' in modextravars.", tmpdir)
else:
raise EasyBuildError("Nim-specific hook triggered for non-Nim easyconfig?!")


def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix):
"""Relax number of failing numerical LAPACK tests for aarch64/neoverse_v1 CPU target for OpenBLAS < 0.3.23"""
cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR')
Expand Down Expand Up @@ -970,6 +980,7 @@ def inject_gpu_property(ec):
'grpcio': parse_hook_grpcio_zlib,
'LAMMPS': parse_hook_lammps_remove_deps_for_aarch64,
'CP2K': parse_hook_CP2K_remove_deps_for_aarch64,
'Nim': parse_hook_Nim_add_XDG_CACHE_HOME,
'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors,
'pybind11': parse_hook_pybind11_replace_catch2,
'Qt5': parse_hook_qt5_check_qtwebengine_disable,
Expand Down

0 comments on commit d3761f4

Please sign in to comment.