From 8da226c5eec4aa204e3d522cc322f228b85f4aa5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 22 Sep 2023 10:12:32 +0200 Subject: [PATCH] also fix SIGSTKSZ for isoband R package via pre-extension hook --- eb_hooks.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 95092fbdc2..ce84ba655e 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -282,7 +282,7 @@ def pre_single_extension_hook(ext, *args, **kwargs): def pre_single_extension_testthat(ext, *args, **kwargs): """ - Pre-extension hook for testthat, to fix build on top of recent glibc. + Pre-extension hook for testthat R package, to fix build on top of recent glibc. """ if ext.name == 'testthat' and LooseVersion(ext.version) < LooseVersion('3.1.0'): # use constant value instead of SIGSTKSZ for stack size, @@ -290,6 +290,16 @@ def pre_single_extension_testthat(ext, *args, **kwargs): ext.cfg['preinstallopts'] = "sed -i 's/SIGSTKSZ/32768/g' inst/include/testthat/vendor/catch.h && " +def pre_single_extension_isoband(ext, *args, **kwargs): + """ + Pre-extension hook for isoband R package, to fix build on top of recent glibc. + """ + if ext.name == 'isoband' and LooseVersion(ext.version) < LooseVersion('0.2.5'): + # use constant value instead of SIGSTKSZ for stack size in vendored testthat included in isoband sources, + # cfr. https://github.com/r-lib/isoband/commit/6984e6ce8d977f06e0b5ff73f5d88e5c9a44c027 + ext.cfg['preinstallopts'] = "sed -i 's/SIGSTKSZ/32768/g' src/testthat/vendor/catch.h && " + + PARSE_HOOKS = { 'CGAL': parse_hook_cgal_toolchainopts_precise, 'fontconfig': parse_hook_fontconfig_add_fonts, @@ -314,5 +324,6 @@ def pre_single_extension_testthat(ext, *args, **kwargs): } PRE_SINGLE_EXTENSION_HOOKS = { + 'isoband': pre_single_extension_isoband, 'testthat': pre_single_extension_testthat, }