@@ -209,6 +209,18 @@ def parse_hook_openblas_relax_lapack_tests_num_errors(ec, eprefix):
209209 raise EasyBuildError ("OpenBLAS-specific hook triggered for non-OpenBLAS easyconfig?!" )
210210
211211
212+ def parse_hook_Pillow_SIMD_harcoded_paths (ec , eprefix ):
213+ # patch setup.py to prefix hardcoded /usr/* and /lib paths with value of %(sysroot) template
214+ # (which will be empty if EasyBuild is not configured to use an alternate sysroot);
215+ # see also https://gitlab.com/eessi/support/-/issues/9
216+ if ec .name == 'Pillow-SIMD' :
217+ ec .update ('preinstallopts' , """sed -i 's@"/usr/@"%(sysroot)s/usr/@g' setup.py && """ )
218+ ec .update ('preinstallopts' , """sed -i 's@"/lib@"%(sysroot)s/lib@g' setup.py && """ )
219+ print_msg ("Using custom configure options for %s: %s" , ec .name , ec ['preinstallopts' ])
220+ else :
221+ raise EasyBuildError ("Pillow-SIMD-specific hook triggered for non-Pillow-SIMD easyconfig?!" )
222+
223+
212224def parse_hook_pybind11_replace_catch2 (ec , eprefix ):
213225 """
214226 Replace Catch2 build dependency in pybind11 easyconfigs with one that doesn't use system toolchain.
@@ -578,6 +590,7 @@ def inject_gpu_property(ec):
578590 'CGAL' : parse_hook_cgal_toolchainopts_precise ,
579591 'fontconfig' : parse_hook_fontconfig_add_fonts ,
580592 'OpenBLAS' : parse_hook_openblas_relax_lapack_tests_num_errors ,
593+ 'Pillow-SIMD' : parse_hook_Pillow_SIMD_harcoded_paths ,
581594 'pybind11' : parse_hook_pybind11_replace_catch2 ,
582595 'Qt5' : parse_hook_qt5_check_qtwebengine_disable ,
583596 'UCX' : parse_hook_ucx_eprefix ,
0 commit comments