-
Notifications
You must be signed in to change notification settings - Fork 204
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 support for ModuleLoadEnvironment aliases in easyconfig parameter modextrapaths #4774
Open
lexming
wants to merge
27
commits into
easybuilders:5.0.x
Choose a base branch
from
lexming:modload-modextrapath
base: 5.0.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+389
−304
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…paths in make_module_req leveraging ModuleLoadEnvironment
…uments to ModuleEnvironmentVariable
…ents have been aligned with modextrapaths options
…oadEnvironment and expand globs to real paths following symlinks
…ng out of install dir
…g with underscores
…paths in modextrapaths are always allowed
… attribute to mod_prepend
Test report for underscore variables of
|
Test report for
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for
--module-search-path-headers
This is the final change to fully fix #3331 . Now that we have
--module-search-path-headers
we need to allowmodextrapaths
to follow that setting. This PR achieves that by addingMODULE_LOAD_ENV_HEADERS
as a new constant in easyconfigs. Hence, the sameMODULE_LOAD_ENV_HEADERS
global can be used in EasyBlocks and EasyConfigs.Unify interface to add extra paths in easyconfigs
Currently, there are differing methods to handle options for extra paths. For instance:
modextrapaths
andmodextrapaths_append
allow to change placement of paths in the module environmentmodextrapath = { 'ENV_VAR' : {'paths': "path", 'delimiter': ':'}}
allow_append_abs_path
andallow_prepend_abs_path
enable absolute paths inmodextrapaths
This PR standardizes how extra paths can be injected in easyconfigs by making
modextrapaths
the only usable parameter. All existing options have been added toModuleEnvironmentVariable
(likedelimiter
andprepend
) and all class settings can now be set through a dictionary inmodextrapaths
. Example:Hence,
modextrapaths
becomes the interface toModuleLoadEnvironment
at the easyconfig level.modextrapaths_append
is deprecated, same result can be achieved with{'prepend': False}
inmodextrapaths
.Enable absolute paths in module environment
Absolute paths are allowed by default in all path variables of
ModuleLoadEnvironment
. Deprecatingallow_append_abs_path
andallow_prepend_abs_path
.Providing a glob pattern that is an absolute path is enough to enable absolute paths expansion and injection in module files.
Method
expand_module_search_path
is enhanced to handle absolute globs:directory after expansion. Which is the only possible scenario that is dangerous.
expand_module_search_path
always returns paths avoiding symlinks. This removes the need to check for the topology of symlinks betweenlib
andlib64
for instance. However, generated modules look different in some cases, with paths to the same folder jumping through different parents (e.g.imkl
with libraries in customs dirs andlib
andlib64
symlinks).LibSymlink
class and related methods from frameworkEnhance
ModuleLoadEnvironment
to handle environment variables starting with underscoresModuleLoadEnvironment
enhanced to allow handing environment variables that start with a one or more underscores. This is necessary to process easyconfigs like libglvnd-1.7.0-GCCcore-13.3.0.eb.All public environment variables are now stored inside a custom dict in
ModuleLoadEnvironment._env_vars
. Getter and setter methods have been modified to be able to discriminate between private attributes of the class and public environment variables.