easybuild.framework.easyconfig.parser module

This describes the easyconfig parser

The parser is format version aware

author:Stijn De Weirdt (Ghent University)
class easybuild.framework.easyconfig.parser.EasyConfigParser(filename=None, format_version=None, rawcontent=None, auto_convert_value_types=True)

Bases: object

Read the easyconfig file, return a parsed config object Can contain references to multiple version and toolchain/toolchain versions

check_values_types(cfg)

Check types of easyconfig parameter values.

Parameters:cfg – dictionary with easyconfig parameter values (result of get_config_dict())
dump(ecfg, default_values, templ_const, templ_val)

Dump easyconfig in format it was parsed from.

get_config_dict(validate=True)

Return parsed easyconfig as a dict.

process(filename=None)

Create an instance

set_format_text()

Create the text for the formatter instance

set_specifications(specs)

Set specifications.

write(filename=None)

Write the easyconfig format instance, using content in self.rawcontent.

easybuild.framework.easyconfig.parser.fetch_parameters_from_easyconfig(rawtxt, params)

Fetch (initial) parameter definition from the given easyconfig file contents. :param rawtxt: contents of the easyconfig file :param params: list of parameter names to fetch values for