easybuild.tools.module_naming_scheme.mns module¶
Module naming scheme API.
Authors:
- Jens Timmerman (Ghent University)
- Kenneth Hoste (Ghent University)
-
class
easybuild.tools.module_naming_scheme.mns.ModuleNamingScheme(*args, **kwargs)¶ Bases:
abc.BaseModuleNamingSchemeAbstract class for a module naming scheme implementation.
-
REQUIRED_KEYS= None¶
-
det_full_module_name(ec)¶ Determine full module name, relative to the top of the module path.
Parameters: ec – dict-like object with easyconfig parameter values; for now only the ‘name’, ‘version’, ‘versionsuffix’ and ‘toolchain’ parameters are guaranteed to be available Returns: string with full module name, e.g.: ‘<compiler>/<mpi_lib>/<name>/<version>’
-
det_init_modulepaths(ec)¶ Determine initial module paths, where the modules that are top of the hierarchy (if any) live.
-
det_install_subdir(ec)¶ Determine name of software installation subdirectory of install path.
Parameters: ec – dict-like object with easyconfig parameter values; for now only the ‘name’, ‘version’, ‘versionsuffix’ and ‘toolchain’ parameters are guaranteed to be available Returns: string with name of subdirectory, e.g.: ‘<compiler>/<mpi_lib>/<name>/<version>’
-
det_make_devel_module()¶ Determine if a devel module should be generated. Can be used to create a separate set of modules with a different naming scheme. Software is already installed beforehand with one naming scheme, including development module.
-
det_modpath_extensions(ec)¶ Determine list of subdirectories for which to extend $MODULEPATH with when this module is loaded (if any).
Parameters: ec – dict-like object with easyconfig parameter values; for now only the ‘name’, ‘version’, ‘versionsuffix’ and ‘toolchain’ parameters are guaranteed to be available Returns: A list of $MODULEPATH subdirectories.
-
det_module_subdir(ec)¶ Determine subdirectory for module file in $MODULEPATH. This determines the separation between module names exposed to users, and what’s part of the $MODULEPATH.
Parameters: ec – dict-like object with easyconfig parameter values; for now only the ‘name’, ‘version’, ‘versionsuffix’ and ‘toolchain’ parameters are guaranteed to be available Returns: string with subdir path (relative to $MODULEPATH), e.g. ‘<compiler>/<mpi_lib>’
-
det_module_symlink_paths(ec)¶ Determine list of paths in which symlinks to module files must be created.
-
det_short_module_name(ec)¶ Determine short module name, i.e. the name under which modules will be exposed to users.
Parameters: ec – dict-like object with easyconfig parameter values; for now only the ‘name’, ‘version’, ‘versionsuffix’ and ‘toolchain’ parameters are guaranteed to be available Returns: string with module name, e.g. ‘<name>/<version>’
-
det_user_modpath_extensions(ec)¶ Determine list of subdirectories relative to the user-specific modules directory for which to extend $MODULEPATH with when this module is loaded (if any).
Parameters: ec – dict-like object with easyconfig parameter values; for now only the ‘name’, ‘version’, ‘versionsuffix’ and ‘toolchain’ parameters are guaranteed to be available Returns: A list of $MODULEPATH subdirectories.
-
expand_toolchain_load(ec=None)¶ Determine whether load statements for a toolchain should be expanded to load statements for its dependencies. This is useful when toolchains are not exposed to users.
-
is_short_modname_for(short_modname, name)¶ Determine whether the specified (short) module name is a module for software with the specified name. Default implementation checks via a strict regex pattern, and assumes short module names are of the form:
<name>/<version>[-<toolchain>]
-
is_sufficient(keys)¶ Determine whether specified list of easyconfig parameters is sufficient for this module naming scheme.
-
requires_toolchain_details()¶ Determine whether toolchain details are required by this module naming scheme, e.g. whether one of det_toolchain_* functions are relied upon.
-