easybuild.framework.easyconfig.tools module

Easyconfig module that provides functionality for dealing with easyconfig (.eb) files, alongside the EasyConfig class to represent parsed easyconfig files.

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:Fotis Georgatos (Uni.Lu, NTUA)
author:Ward Poelmans (Ghent University)
easybuild.framework.easyconfig.tools.alt_easyconfig_paths(tmpdir, tweaked_ecs=False, from_prs=None, review_pr=None)

Obtain alternative paths for easyconfig files.


Return a list of all available easyblocks.


Splits list of filepaths into a 4 separate lists: easyconfigs, files to delete, patch files and files with extension .py

easybuild.framework.easyconfig.tools.check_sha256_checksums(ecs, whitelist=None)

Check whether all provided (parsed) easyconfigs have SHA256 checksums for sources & patches.

Parameters:whitelist – list of regex patterns on easyconfig filenames; check is skipped for matching easyconfigs
Returns:list of strings describing checksum issues (missing checksums, wrong checksum type, etc.)
easybuild.framework.easyconfig.tools.det_copy_ec_specs(orig_paths, from_pr)

Determine list of paths + target directory for –copy-ec.


Determine paths to easyconfig files. :param orig_paths: list of original easyconfig paths :return: list of paths to easyconfig files

easybuild.framework.easyconfig.tools.dump_env_easyblock(app, orig_env=None, ec_path=None, script_path=None, silent=False)

Dump source scripts that set up build environment for specified easyconfigs.

Parameters:easyconfigs – list of easyconfigs to generate scripts for

Find related easyconfigs for provided parsed easyconfig in specified path.

A list of easyconfigs for the same software (name) is returned, matching the 1st criterion that yields a non-empty list.

The following criteria are considered (in this order) next to common software version criterion, i.e. exact version match, a major/minor version match, a major version match, or no version match (in that order).

  1. matching versionsuffix and toolchain name/version
  2. matching versionsuffix and toolchain name (any toolchain version)
  3. matching versionsuffix (any toolchain name/version)
  4. matching toolchain name/version (any versionsuffix)
  5. matching toolchain name (any versionsuffix, toolchain version)
  6. no extra requirements (any versionsuffix, toolchain name/version)

If no related easyconfigs with a matching software name are found, an empty list is returned.

easybuild.framework.easyconfig.tools.find_resolved_modules(easyconfigs, avail_modules, modtool, retain_all_deps=False)

Find easyconfigs in 1st argument which can be fully resolved using modules specified in 2nd argument

  • easyconfigs – list of parsed easyconfigs
  • avail_modules – list of available modules
  • retain_all_deps – retain all dependencies, regardless of whether modules are available for them or not
easybuild.framework.easyconfig.tools.get_paths_for(subdir='easyconfigs', robot_path=None)

Return a list of absolute paths where the specified subdir can be found, determined by the PYTHONPATH

easybuild.framework.easyconfig.tools.parse_easyconfigs(paths, validate=True)

Parse easyconfig files :param paths: paths to easyconfigs

easybuild.framework.easyconfig.tools.review_pr(paths=None, pr=None, colored=True, branch='develop', testing=False, max_ecs=None, filter_ecs=None)

Print multi-diff overview between specified easyconfigs or PR and specified branch. :param pr: pull request number in easybuild-easyconfigs repo to review :param paths: path tuples (path, generated) of easyconfigs to review :param colored: boolean indicating whether a colored multi-diff should be generated :param branch: easybuild-easyconfigs branch to compare with :param testing: whether to ignore PR labels (used in test_review_pr)


Run contribution check on specified easyconfigs.

easybuild.framework.easyconfig.tools.skip_available(easyconfigs, modtool)

Skip building easyconfigs for existing modules.

easybuild.framework.easyconfig.tools.stats_to_str(stats, isyeb=False)

Pretty print build statistics to string.