Skip to content
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

add module-search-path-headers configuration option to control how modules set search paths to header files #4655

Merged
merged 19 commits into from
Feb 12, 2025

Conversation

lexming
Copy link
Contributor

@lexming lexming commented Sep 24, 2024

Depends on:

This PR adds a new build option and easyconfig parameter called module-search-path-headers to control what environment variables will be added to module files with search paths to headers:

  • none: (new setting) no variables added to module files with paths to headers
  • CPATH: (default and current setting) modules set CPATH on load
  • INCLUDE_PATHS: (new setting) modules set variables C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, OBJC_INCLUDE_PATH on load with paths to headers

New test added to easyblock suite for this new option.

update 1: easybuild.tools.modules.ModuleLoadEnvironment is enhanced with the capability to hold private attributes that are invisible for the generation of the module environment.

update 2: easybuild.tools.modules.ModuleLoadEnvironment is enhanced with the capability to define arbitrary aliases to ModuleEnvironmentVariable

@boegel boegel changed the title add option module-search-path-headers to control how modules set search paths to header files add module-search-path-headers configuration option to control how modules set search paths to header files Oct 9, 2024
@boegel boegel added this to the 5.0 milestone Oct 9, 2024
@boegel
Copy link
Member

boegel commented Jan 20, 2025

@lexming please sync this with 5.0.x now that #4653 is merged

@lexming
Copy link
Contributor Author

lexming commented Feb 9, 2025

This is poorly designed, working on a better approach...

@boegel
Copy link
Member

boegel commented Feb 9, 2025

This is poorly designed, working on a better approach...

Poorly designed in what sense?

@lexming lexming marked this pull request as ready for review February 10, 2025 12:14
@lexming
Copy link
Contributor Author

lexming commented Feb 10, 2025

@boegel in the previous iteration I added a bunch of logic related to the option module_search_path_headers into ModuleLoadEnvironment. This is not ideal, because it does not serve any other purpose than this specific option.
So, I replaced that with a more generic aliases feature that allows to define aliases of environment variables for any purpose. Therefore, handling the specific of module_search_path_headers can be contained in EasyBlock, where it belongs as EasyBlock knows about all build options and easyconfig parameters.

easybuild/tools/config.py Outdated Show resolved Hide resolved
…' as valid value for --module-search-path-headers
minor tweak for support for `--module-search-path-headers`
Copy link
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel merged commit 8ef6d6e into easybuilders:5.0.x Feb 12, 2025
39 checks passed
@lexming lexming deleted the cpath-mod-opt branch February 12, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Nice-to-have
Development

Successfully merging this pull request may close these issues.

2 participants