Skip to content

Commit 08b3e42

Browse files
committed
Use a pre-permission hook to avoid issues with permissions
1 parent 7d7f7e0 commit 08b3e42

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

eb_hooks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,10 @@ def pre_configure_hook(self, *args, **kwargs):
211211
PRE_CONFIGURE_HOOKS[self.name](self, *args, **kwargs)
212212

213213

214-
def post_package_hook(self, *args, **kwargs):
214+
def pre_permissions_hook(self, *args, **kwargs):
215215
"""Main post-package hook: trigger custom functions based on software name."""
216-
if self.name in POST_PACKAGE_HOOKS:
217-
POST_PACKAGE_HOOKS[self.name](self, *args, **kwargs)
216+
if self.name in PRE_PERMISSIONS_HOOKS:
217+
PRE_PERMISSIONS_HOOKS[self.name](self, *args, **kwargs)
218218

219219

220220
def pre_configure_hook_openblas_optarch_generic(self, *args, **kwargs):
@@ -336,7 +336,7 @@ def pre_single_extension_isoband(ext, *args, **kwargs):
336336
# cfr. https://github.com/r-lib/isoband/commit/6984e6ce8d977f06e0b5ff73f5d88e5c9a44c027
337337
ext.cfg['preinstallopts'] = "sed -i 's/SIGSTKSZ/32768/g' src/testthat/vendor/catch.h && "
338338

339-
def post_package_cuda(self, *args, **kwargs):
339+
def pre_permissions_cuda(self, *args, **kwargs):
340340
"""Delete CUDA files we are not allowed to ship and replace them with a symlink to a possible installation under host_injections."""
341341
print_msg("Replacing CUDA stuff we cannot ship with symlinks...")
342342
# read CUDA EULA
@@ -437,6 +437,6 @@ def inject_gpu_property(ec):
437437
'testthat': pre_single_extension_testthat,
438438
}
439439

440-
POST_PACKAGE_HOOKS = {
441-
'CUDA': post_package_cuda,
440+
PRE_PERMISSIONS_HOOKS = {
441+
'CUDA': pre_permissions_cuda,
442442
}

0 commit comments

Comments
 (0)