easybuild.tools.config module

EasyBuild configuration (paths, preferences, etc.)

author:Stijn De Weirdt (Ghent University)
author:Dries Verdegem (Ghent University)
author:Kenneth Hoste (Ghent University)
author:Pieter De Baets (Ghent University)
author:Jens Timmerman (Ghent University)
author:Toon Willems (Ghent University)
author:Ward Poelmans (Ghent University)
author:Damian Alvarez (Forschungszentrum Juelich GmbH)
class easybuild.tools.config.BuildOptions(*args, **kwargs)

Bases: vsc.utils.missing.FrozenDictKnownKeys

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

KNOWN_KEYS = ['add_dummy_to_minimal_toolchains', 'allow_modules_tool_mismatch', 'consider_archived_easyconfigs', 'debug', 'debug_lmod', 'dump_autopep8', 'enforce_checksums', 'extended_dry_run', 'experimental', 'fixed_installdir_naming_scheme', 'force', 'group_writable_installdir', 'hidden', 'ignore_checksums', 'install_latest_eb_release', 'minimal_toolchains', 'module_only', 'package', 'read_only_installdir', 'rebuild', 'robot', 'rpath', 'search_paths', 'sequential', 'set_gid_bit', 'skip_test_cases', 'sticky_bit', 'trace', 'upload_test_report', 'update_modules_tool_cache', 'use_ccache', 'use_f90cache', 'use_existing_modules', 'set_default_module', 'cleanup_builddir', 'cleanup_easyconfigs', 'cleanup_tmpdir', 'extended_dry_run_ignore_errors', 'mpi_tests', 'suffix_modules_path', 'max_fail_ratio_adjust_permissions', 'allow_loaded_modules', 'aggregate_regtest', 'backup_modules', 'download_timeout', 'dump_test_report', 'easyblock', 'extra_modules', 'filter_deps', 'filter_env_vars', 'hide_deps', 'hide_toolchains', 'force_download', 'from_pr', 'git_working_dirs_path', 'pr_branch_name', 'pr_target_account', 'pr_target_branch', 'pr_target_repo', 'github_user', 'github_org', 'group', 'ignore_dirs', 'job_backend_config', 'job_cores', 'job_max_walltime', 'job_output_dir', 'job_polling_interval', 'job_target_resource', 'modules_footer', 'modules_header', 'mpi_cmd_template', 'only_blocks', 'optarch', 'package_tool_options', 'parallel', 'rpath_filter', 'regtest_output_dir', 'skip', 'stop', 'subdir_user_modules', 'test_report_env_filter', 'testoutput', 'umask', 'zip_logs', 'check_ebroot_env_vars', 'detect_loaded_modules', 'strict', 'package_type', 'package_tool', 'package_release', 'default_opt_level', 'dry_run', 'recursive_mod_unload', 'retain_all_deps', 'silent', 'try_to_generate', 'check_osdeps', 'validate', 'build_specs', 'command_line', 'external_modules_metadata', 'pr_path', 'robot_path', 'valid_module_classes', 'valid_stops']
k = 'valid_stops'
ks = ['build_specs', 'command_line', 'external_modules_metadata', 'pr_path', 'robot_path', 'valid_module_classes', 'valid_stops']
kss = {False: ['dry_run', 'recursive_mod_unload', 'retain_all_deps', 'silent', 'try_to_generate'], True: ['check_osdeps', 'validate'], None: ['build_specs', 'command_line', 'external_modules_metadata', 'pr_path', 'robot_path', 'valid_module_classes', 'valid_stops']}
class easybuild.tools.config.ConfigurationVariables(*args, **kwargs)

Bases: vsc.utils.missing.FrozenDictKnownKeys

This is a dict that supports legacy config names transparently.

KNOWN_KEYS = ['buildpath', 'config', 'installpath', 'installpath_modules', 'installpath_software', 'job_backend', 'logfile_format', 'moduleclasses', 'module_naming_scheme', 'module_syntax', 'modules_tool', 'packagepath', 'package_naming_scheme', 'prefix', 'repository', 'repositorypath', 'sourcepath', 'subdir_modules', 'subdir_software', 'tmp_logdir']
REQUIRED = ['buildpath', 'config', 'installpath', 'installpath_modules', 'installpath_software', 'job_backend', 'logfile_format', 'moduleclasses', 'module_naming_scheme', 'module_syntax', 'modules_tool', 'packagepath', 'package_naming_scheme', 'prefix', 'repository', 'repositorypath', 'sourcepath', 'subdir_modules', 'subdir_software', 'tmp_logdir']
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
easybuild.tools.config.build_option(key, **kwargs)

Obtain value specified build option.

easybuild.tools.config.build_path()

Return the build path

easybuild.tools.config.find_last_log(curlog)

Find location to last log file that is still available.

Parameters:curlog – location to log file of current session
Returns:path to last log file (or None if no log files were found)
easybuild.tools.config.get_build_log_path()

Return (temporary) directory for build log

easybuild.tools.config.get_job_backend()

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

easybuild.tools.config.get_log_filename(name, version, add_salt=False, date=None, timestamp=None)

Generate a filename to be used for logging

Parameters:
  • name – software name (‘%(name)s’)
  • version – software version (‘%(version)s’)
  • add_salt – add salt (5 random characters)
  • date – string representation of date to use (‘%(date)s’)
  • timestamp – timestamp to use (‘%(time)s’)
easybuild.tools.config.get_module_naming_scheme()

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

easybuild.tools.config.get_module_syntax()

Return module syntax (Lua, Tcl)

easybuild.tools.config.get_modules_tool()

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

easybuild.tools.config.get_package_naming_scheme()

Return the package naming scheme

easybuild.tools.config.get_pretend_installpath()

Get the installpath when –pretend option is used

easybuild.tools.config.get_repository()

Return the repository (git, svn or file)

easybuild.tools.config.get_repositorypath()

Return the repository path

easybuild.tools.config.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

easybuild.tools.config.init_build_options(build_options=None, cmdline_options=None)

Initialize build options.

easybuild.tools.config.install_path(typ=None)

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

easybuild.tools.config.log_file_format(return_directory=False)

Return the format for the logfile or the directory

easybuild.tools.config.log_format()

Return the logfilename format

easybuild.tools.config.log_path()

Return the log path

easybuild.tools.config.mk_full_default_path(name, prefix='/home/docs/.local/easybuild')

Create full path, avoid ‘/’ at the end.

easybuild.tools.config.module_classes()

Return list of module classes specified in config file.

easybuild.tools.config.package_path()

Return the path where built packages are copied to

easybuild.tools.config.read_environment(env_vars, strict=False)

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

easybuild.tools.config.source_path()

NO LONGER SUPPORTED: use source_paths instead

easybuild.tools.config.source_paths()

Return the list of source paths