diff --git a/eb_hooks.py b/eb_hooks.py index 084b78e5e0..9031d97831 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -177,6 +177,23 @@ def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix): raise EasyBuildError("OpenBLAS-specific hook triggered for non-OpenBLAS easyconfig?!") +def parse_hook_pillow_set_cpath_library_path(ec, eprefix): + """Extend CPATH and LIBRARY_PATH environment variables using EESSI_EPREFIX.""" + if ec.name == 'Pillow': + EESSI_CPATH = os.getenv('EESSI_EPREFIX') + '/usr/include' + EESSI_LIB_PATH = os.getenv('EESSI_EPREFIX') + '/usr/lib64' + print_msg("NOTE: Pillow has zlib as a dependancy, The original CPATH value: (%s) has been extended with (%s)", + os.getenv('CPATH'), EESSI_CPATH) + print_msg("NOTE: Pillow has zlib as a dependancy, The original LIBRARY_PATH value: (%s) has been extended with (%s)", + os.getenv('LIBRARY_PATH'), EESSI_LIB_PATH) + ec.log.info("NOTE: Pillow has zlib as a dependancy, The original CPATH value: (%s) has been extended with (%s)", + os.getenv('CPATH'), EESSI_CPATH) + ec.log.info("NOTE: Pillow has zlib as a dependancy, The original LIBRARY_VALUE value: (%s) has been extended with (%s)", + os.getenv('LIBRARY_PATH'), EESSI_LIB_PATH) + os.environ['CPATH'] = os.pathsep.join(filter(None,[os.environ.get('CPATH',''), EESSI_CPATH])) + os.environ['LIBRARY_PATH'] = os.pathsep.join(filter(None,[os.environ.get('LIBRARY_PATH',''), EESSI_LIB_PATH])) + + def parse_hook_ucx_eprefix(ec, eprefix): """Make UCX aware of compatibility layer via additional configuration options.""" if ec.name == 'UCX': @@ -272,6 +289,7 @@ def pre_test_hook_ignore_failing_tests_SciPybundle(self, *args, **kwargs): 'CGAL': parse_hook_cgal_toolchainopts_precise, 'fontconfig': parse_hook_fontconfig_add_fonts, 'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors, + 'Pillow': parse_hook_pillow_set_cpath_library_path, 'UCX': parse_hook_ucx_eprefix, } diff --git a/eessi-2023.06-eb-4.8.1-2022a.yml b/eessi-2023.06-eb-4.8.1-2022a.yml index 2486f5c060..14f936bdbd 100644 --- a/eessi-2023.06-eb-4.8.1-2022a.yml +++ b/eessi-2023.06-eb-4.8.1-2022a.yml @@ -8,6 +8,10 @@ easyconfigs: - gzip-1.12-GCCcore-11.3.0.eb - lz4-1.9.3-GCCcore-11.3.0.eb - zstd-1.5.2-GCCcore-11.3.0.eb + - Pillow-9.1.1-GCCcore-11.3.0.eb: + # avoid that hardcoded paths like /usr/include are used in build commands + options: + from-pr: 18881 - Boost.Python-1.79.0-GCC-11.3.0.eb - netCDF-4.9.0-gompi-2022a.eb: # use updated CMakeMake easyblock to avoid that -DCMAKE_SKIP_RPATH=ON is used, which breaks the netCDF test step @@ -50,4 +54,13 @@ easyconfigs: - PCRE2-10.40-GCCcore-11.3.0.eb - Tk-8.6.12-GCCcore-11.3.0.eb - GROMACS-2023.1-foss-2022a.eb + - MUMPS-5.5.1-foss-2022a-metis.eb + - Pillow-9.1.1-GCCcore-11.3.0.eb: + # Uses a custom hook since has zlib as dependency which has hard coded header and library path within Pillow code. + options: + from-pr: 18881 + - ParaView-5.10.1-foss-2022a-mpi.eb: + options: + download-timeout: 1000 + - ASE-3.22.1-foss-2022a.eb - HISAT2-2.2.1-gompi-2022a.eb