Skip to content

Adding general way to handle filtered deps when installing software #1095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from easybuild.tools.systemtools import AARCH64, POWER, X86_64, get_cpu_architecture, get_cpu_features
from easybuild.tools.toolchain.compiler import OPTARCH_GENERIC
from easybuild.tools.version import VERSION as EASYBUILD_VERSION
from easybuild.tools.modules import get_software_root_env_var_name

# prefer importing LooseVersion from easybuild.tools, but fall back to distuils in case EasyBuild <= 4.7.0 is used
try:
Expand Down Expand Up @@ -519,6 +520,12 @@ def post_prepare_hook_highway_handle_test_compilation_issues(self, *args, **kwar

def pre_configure_hook(self, *args, **kwargs):
"""Main pre-configure hook: trigger custom functions based on software name."""
eprefix = get_eessi_envvar('EPREFIX')

for filter_dep_spec in build_option('filter_deps') or []:
var_name = get_software_root_env_var_name(filter_dep_spec)
env.setvar(var_name, os.path.join(eprefix, 'usr'))

if self.name in PRE_CONFIGURE_HOOKS:
PRE_CONFIGURE_HOOKS[self.name](self, *args, **kwargs)

Expand Down
Loading