Skip to content

Commit

Permalink
also fix SIGSTKSZ for isoband R package via pre-extension hook
Browse files Browse the repository at this point in the history
  • Loading branch information
boegel committed Sep 22, 2023
1 parent f3a1f35 commit 8da226c
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 @@ -282,14 +282,24 @@ 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,
# cfr. https://github.com/r-lib/testthat/issues/1373 + https://github.com/r-lib/testthat/pull/1403
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,
Expand All @@ -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,
}

0 comments on commit 8da226c

Please sign in to comment.