Skip to content

Commit

Permalink
Added a hook as a test for LANG variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Top committed Oct 13, 2023
1 parent 58fc0e6 commit 08d9276
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,15 @@ def parse_hook_pillow_set_cpath_library_path(ec, eprefix):
os.environ['LIBRARY_PATH'] = os.pathsep.join(filter(None,[os.environ.get('LIBRARY_PATH',''), EESSI_LIB_PATH]))



def parse_hook_python_bare_set_LANG(ec, eprefix):
"""Set the LANG variable to C.UTF-8 in case it was empty."""
if ec.name == 'Python' and ec.version =='2.7.18' and os.getenv('LANG') is None:
print_msg("NOTE: The environment variable: LANG will be set to C.UTF-8")
ec.log.info("NOTE: The environment variable: LANG will be set to C.UTF-8")
os.environ['LANG'] = 'C.UTF-8'


def parse_hook_ucx_eprefix(ec, eprefix):
"""Make UCX aware of compatibility layer via additional configuration options."""
if ec.name == 'UCX':
Expand Down Expand Up @@ -290,6 +299,7 @@ def pre_test_hook_ignore_failing_tests_SciPybundle(self, *args, **kwargs):
'fontconfig': parse_hook_fontconfig_add_fonts,
'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors,
'Pillow': parse_hook_pillow_set_cpath_library_path,
'Python': parse_hook_python_bare_set_LANG,
'UCX': parse_hook_ucx_eprefix,
}

Expand Down
1 change: 1 addition & 0 deletions eessi-2023.06-eb-4.8.1-2022a.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ easyconfigs:
# Uses a custom hook since has zlib as dependency which has hard coded header and library path within Pillow code.
options:
from-pr: 18881
- Python-2.7.18-GCCcore-11.3.0-bare.eb

0 comments on commit 08d9276

Please sign in to comment.