easybuild.framework.easyconfig.format.pyheaderconfigobj module¶
The main easyconfig format class
author: | Stijn De Weirdt (Ghent University) |
---|---|
author: | Kenneth Hoste (Ghent University) |
-
class
easybuild.framework.easyconfig.format.pyheaderconfigobj.
EasyConfigFormatConfigObj
(*args, **kwargs)¶ Bases:
easybuild.framework.easyconfig.format.format.EasyConfigFormat
Extended EasyConfig format, with support for a header and sections that are actually parsed (as opposed to exec’ed). It’s very limited for now, but is already huge improvement.
3 parts in easyconfig file: - header (^# style) - pyheader (including docstring)
- contents is exec’ed, docstring and remainder are extracted
- begin of regular section until EOF
- feed to ConfigObj
-
PYHEADER_ALLOWED_BUILTINS
= []¶
-
PYHEADER_BLACKLIST
= None¶
-
PYHEADER_MANDATORY
= None¶
-
parse
(txt, strict_section_markers=False)¶ Pre-process txt to extract header, docstring and pyheader Then create the configobj instance by parsing the remainder
-
parse_header
(header)¶ Parse the header, assign to self.header
-
parse_pre_section
(txt)¶ Parse the text block before the start of the first section
-
parse_pyheader
(pyheader)¶ Parse the python header, assign to docstring and cfg
-
parse_section_block
(section)¶ Parse the section block by trying to convert it into a ConfigObj instance
-
pyheader_env
()¶ Create the global/local environment to use with eval/execfile
-
easybuild.framework.easyconfig.format.pyheaderconfigobj.
build_easyconfig_constants_dict
()¶ Make a dictionary with all constants that can be used
-
easybuild.framework.easyconfig.format.pyheaderconfigobj.
build_easyconfig_variables_dict
()¶ Make a dictionary with all variables that can be used