easybuild.framework.easyconfig.format.two module

This describes the easyconfig format versions 2.x

This is a mix between version 1.0 and configparser-style configuration

author:Stijn De Weirdt (Ghent University)
author:Kenneth Hoste (Ghent University)
class easybuild.framework.easyconfig.format.two.FormatTwoZero(*args, **kwargs)

Bases: easybuild.framework.easyconfig.format.pyheaderconfigobj.EasyConfigFormatConfigObj

Support for easyconfig format 2.0 Simple extension of FormatOneZero with configparser blocks

Doesn’t set version and toolchain/toolchain version like in FormatOneZero; referencing ‘version’ directly in pyheader doesn’t work => use templating ‘%(version)s’

NOT in 2.0
  • order preservation: need more recent ConfigObj (more recent Python as minimal version)
  • nested sections (need other ConfigParser/ConfigObj, eg INITools)
  • type validation
  • command line generation (–try-X command line options)
AUTHOR_DOCSTRING_REGEX = <_sre.SRE_Pattern object>
AUTHOR_REQUIRED = True
MAINTAINER_DOCSTRING_REGEX = <_sre.SRE_Pattern object>
MAINTAINER_REQUIRED = False
NAME_DOCSTRING_REGEX_TEMPLATE = '^\\s*@%s\\s*:\\s*(?P<name>\\S.*?)\\s*$'
PYHEADER_ALLOWED_BUILTINS = ['len', 'False', 'True']
PYHEADER_BLACKLIST = ['version', 'toolchain']
PYHEADER_MANDATORY = ['name', 'homepage', 'description', 'software_license', 'software_license_urls', 'docurls']
USABLE = True
VERSION = LooseVersion ('2.0')
extract_comments(rawtxt)

Extract comments from raw content.

get_config_dict()

Return the best matching easyconfig dict

validate()

Format validation