-
Notifications
You must be signed in to change notification settings - Fork 202
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
refactor generation of required environment variables in module files + deprecate make_module_req_guess
method in EasyBlock
class
#4653
Conversation
@boegel look all the beautiful green tests! Compared to what I showed on the meeting yesterday, I have undone all changes to This seems ready on my side. I tested it with several easyblocks that add custom stuff to |
…d_module_search_path
…nment variables for module files
…r modules on load
…ed library directories
…ding paths for environment of modules
…er explicit checks in the module step
…vironmentVariable
…file of subsequent installations
add test to verify that environment variables don't leak into module file of subsequent installations
@lexming Can you look into fixing the merge conflict, and get the test to pass? |
…module_req_guess is detected
… property based on new ModEnvVarType enum
…e to control requirements of paths to directories
…ular order of list entries
…link to something else than LibSymlink.UNKNOWN
…TOP_FILES rather than string values
minor changes w.r.t. ModuleLoadEnvironment and ModEnvVarType
This reverts commit 13f735c.
@boegel actually the tests is what saved us, they properly failed. That change in |
updated description to match state of code at merge time |
Goal is to lay groundwork to be able to fix #3331 and add new option to control which search path variables are added in modules by simplifying the code injecting environment variables to module files.
This PR should not alter the resulting module files to what is currently generated by EB. If it changes the list of environment variables it should have no effect (e.g. because those paths are empty).
Simplification of logic handling environment variables for module files:
make_module_req
only populates modules with variables that contain search paths (i.e.ModuleEnvironmentVariable
with atype
ofis_path
category)ModuleEnvironmentVariable
is defined byModEnvVarType
which has 3 path-like types with different levels of requirements on the existence of those paths(fixes directories that don't contain any library files shouldn't be added to
$LD_LIBRARY_PATH
#3504)ModuleEnvironmentVariable
need to be explicitly defined withModEnvVarType.PATH_WITH_TOP_FILES
to require populated top dirsPATH
andLD_LIBRARY_PATH
lib64
that generate duplicate paths and need explicit exceptions with:lib64
are always ignored iflib64
is a symlink tolib
lib
are always ignored iflib
is a symlink tolib64
lib32
from list of library search pathsChangelog:
ModuleEnvironmentVariable
pseudo-dataclass toeasybuild.tools.modules
to hold definitions of environment variables for modulesModuleLoadEnvironment
class toeasybuild.tools.modules
to hold environment definition for modules on loadEasyBlock.make_module_req_guess
in favor ofModuleLoadEnvironment
easybuild.framework.easyblock
to define possible linkage states of lib directoriesinstall_lib_symlink
attribute to EasyBlcok to keep track of symlink status between lib dirseasybuild.tools.config
that define known directories for binaries, libraries and headerseasyblock.make_module_req
by working with absolute paths instead