diff --git a/easybuild/easyblocks/generic/bundle.py b/easybuild/easyblocks/generic/bundle.py index ddf53af8a2f..46663b16393 100644 --- a/easybuild/easyblocks/generic/bundle.py +++ b/easybuild/easyblocks/generic/bundle.py @@ -334,6 +334,11 @@ def install_step(self): new_val = path env.setvar(envvar, new_val) else: + # Explicit call as EasyBlocks might set additional environment variables in + # the make_module step, which may be required for later component builds. + # Set fake arg to True, as module components should not try to create their own module. + comp.make_module_step(fake=True) + # Update current environment with component environment to ensure stuff provided # by this component can be picked up by installation of subsequent components # - this is a stripped down version of EasyBlock.make_module_req for fake modules @@ -386,6 +391,11 @@ def make_module_step(self, *args, **kwargs): raise EasyBuildError("Cannot process module requirements of bundle component %s v%s", cfg['name'], cfg['version']) else: + # Explicit call required as adding step to 'install_step' is not sufficient + # for module-only build. Set fake arg to True, as module components should + # not try to create their own module. + comp.make_module_step(*args, **dict(kwargs, fake=True)) + for env_var_name, env_var_val in comp.module_load_environment.items(): if env_var_name in self.module_load_environment: getattr(self.module_load_environment, env_var_name).extend(env_var_val)