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.
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)
- Fotis Georgatos (Uni.Lu, NTUA)
- 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.
-
easybuild.framework.easyconfig.tools.avail_easyblocks()¶ Return a list of all available easyblocks.
-
easybuild.framework.easyconfig.tools.categorize_files_by_type(paths)¶ 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.
-
easybuild.framework.easyconfig.tools.det_easyconfig_paths(orig_paths)¶ 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)¶
-
easybuild.framework.easyconfig.tools.dump_env_script(easyconfigs)¶ 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).
- matching versionsuffix and toolchain name/version
- matching versionsuffix and toolchain name (any toolchain version)
- matching versionsuffix (any toolchain name/version)
- matching toolchain name/version (any versionsuffix)
- matching toolchain name (any versionsuffix, toolchain version)
- 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
Parameters: - 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)
-
easybuild.framework.easyconfig.tools.run_contrib_checks(ecs)¶ 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.