Skip to content

config

EasyBuild configuration (paths, preferences, etc.)

Authors:

  • Stijn De Weirdt (Ghent University)
  • Dries Verdegem (Ghent University)
  • Kenneth Hoste (Ghent University)
  • Pieter De Baets (Ghent University)
  • Jens Timmerman (Ghent University)
  • Toon Willems (Ghent University)
  • Ward Poelmans (Ghent University)
  • Damian Alvarez (Forschungszentrum Juelich GmbH)
  • Andy Georges (Ghent University)
  • Maxime Boissonneault (Compute Canada)

BuildOptions

Bases: BaseBuildOptions

Representation of a set of build options, acts like a dictionary.

ConfigurationVariables

Bases: BaseConfigurationVariables

This is a dict that supports legacy config names transparently.

get_items_check_required()

For all known/required keys, check if exists and return all key/value pairs. no_missing: boolean, when True, will throw error message for missing values

Singleton

Bases: ABCMeta

Serves as metaclass for classes that should implement the Singleton pattern.

See http://stackoverflow.com/questions/6760685/creating-a-singleton-in-python

build_option(key, **kwargs)

Obtain value specified build option.

build_path()

Return the build path

container_path()

Return the path for container recipes & images

find_last_log(curlog)

Find location to last log file that is still available.

PARAMETER DESCRIPTION
curlog

location to log file of current session

RETURNS DESCRIPTION

path to last log file (or None if no log files were found)

get_build_log_path()

Return (temporary) directory for build log

get_job_backend()

Return job execution backend (PBS, GC3Pie, ...)

get_log_filename(name, version, add_salt=False, date=None, timestamp=None)

Generate a filename to be used for logging

PARAMETER DESCRIPTION
name

software name ('%(name)s')

version

software version ('%(version)s')

add_salt

add salt (5 random characters)

DEFAULT: False

date

string representation of date to use ('%(date)s')

DEFAULT: None

timestamp

timestamp to use ('%(time)s')

DEFAULT: None

get_module_naming_scheme()

Return module naming scheme (EasyBuildMNS, HierarchicalMNS, ...)

get_module_syntax()

Return module syntax (Lua, Tcl)

get_modules_tool()

Return modules tool (EnvironmentModulesC, Lmod, ...)

get_output_style()

Return output style to use.

get_package_naming_scheme()

Return the package naming scheme

get_pretend_installpath()

Get the installpath when --pretend option is used

get_repository()

Return the repository (git, svn or file)

get_repositorypath()

Return the repository path

init(options, config_options_dict)

Gather all variables and check if they're valid Variables are read in this order of preference: generaloption > legacy environment > legacy config file

init_build_options(build_options=None, cmdline_options=None)

Initialize build options.

install_path(typ=None)

Returns the install path - subdir 'software' for actual installation (default) - subdir 'modules' for environment modules (typ='mod')

log_file_format(return_directory=False, ec=None, date=None, timestamp=None)

Return the format for the logfile or the directory

PARAMETER DESCRIPTION
ec

dict-like value that provides values for %(name)s and %(version)s template values

DEFAULT: None

date

string representation of date to use ('%(date)s')

DEFAULT: None

timestamp

timestamp to use ('%(time)s')

DEFAULT: None

log_format(ec=None)

Return the logfilename format

log_path(ec=None)

Return the log path

mk_full_default_path(name, prefix=DEFAULT_PREFIX)

Create full path, avoid '/' at the end.

module_classes()

Return list of module classes specified in config file.

package_path()

Return the path where built packages are copied to

read_environment(env_vars, strict=False)

NO LONGER SUPPORTED: use read_environment from easybuild.tools.environment instead

source_path()

NO LONGER SUPPORTED: use source_paths instead

source_paths()

Return the list of source paths

update_build_option(key, value)

Update build option with specified name to given value.

WARNING: Use this with care, the build options are not expected to be changed during an EasyBuild session!

update_build_options(key_value_dict)

Update build options as specified by the given dictionary (where keys are assumed to be build option names). Returns dictionary with original values for the updated build options.