pkgcore.ebuild.eclass module

Eclass parsing support.

class pkgcore.ebuild.eclass.AttrDict(data=None)[source]

Bases: ImmutableDict

Support accessing dict keys as attributes.

class pkgcore.ebuild.eclass.EclassBlock[source]

Bases: ParseEclassDoc

ECLASS doc block.

tag = '@ECLASS:'
class pkgcore.ebuild.eclass.EclassDoc(path, /, *, sourced=False, repo=None)[source]

Bases: AttrDict

Support parsing eclass docs for a given eclass path.

ABI_VERSION = 5
property exported_function_names

Set of all exported function names in the eclass.

property exported_variable_names

Set of all exported variable names in the eclass.

Ignores variables that start with underscores since it’s assumed they are private.

property function_names

Set of documented function names in the eclass.

property function_variable_names

Set of documented function variable names in the eclass.

property internal_function_names

Set of internal function names in the eclass.

property internal_variable_names

Set of internal variable names in the eclass.

property live

Eclass implements functionality to support a version control system.

static parse(path)[source]

Parse eclass docs.

to_devbook()[source]

Convert eclassdoc object to an HTML 5 document.

to_html()[source]

Convert eclassdoc object to an HTML 5 document.

to_man()[source]

Convert eclassdoc object to a man page.

to_rst()[source]

Convert eclassdoc object to reStructuredText.

property variable_names

Set of documented variable names in the eclass.

class pkgcore.ebuild.eclass.EclassFuncBlock[source]

Bases: ParseEclassDoc

FUNCTION doc block.

default = True
key = 'functions'
parse(*args)[source]

Parse an eclass block.

tag = '@FUNCTION:'
class pkgcore.ebuild.eclass.EclassFuncVarBlock[source]

Bases: ParseEclassDoc

VARIABLE doc block.

default = True
key = 'function_variables'
tag = '@VARIABLE:'
class pkgcore.ebuild.eclass.EclassVarBlock[source]

Bases: ParseEclassDoc

ECLASS_VARIABLE doc block.

default = True
key = 'variables'
parse(lines, line_ind, next_line)[source]

Parse an eclass block.

tag = '@ECLASS_VARIABLE:'
class pkgcore.ebuild.eclass.EclassVarBlockCompat[source]

Bases: ParseEclassDoc

ECLASS-VARIABLE doc block.

default = True
key = 'variables'
tag = '@ECLASS-VARIABLE:'
class pkgcore.ebuild.eclass.ParseEclassDoc(tags)[source]

Bases: object

Generic block for eclass docs.

See the devmanual [1] for the eclass docs specification.

bash_env_vars

The set of all bash variables defined in the default environment.

blocks = {'@ECLASS-VARIABLE:': <pkgcore.ebuild.eclass.EclassVarBlockCompat object>, '@ECLASS:': <pkgcore.ebuild.eclass.EclassBlock object>, '@ECLASS_VARIABLE:': <pkgcore.ebuild.eclass.EclassVarBlock object>, '@FUNCTION:': <pkgcore.ebuild.eclass.EclassFuncBlock object>, '@VARIABLE:': <pkgcore.ebuild.eclass.EclassFuncVarBlock object>}
default = False
property defaults

Return default field mapping for the block.

key = None
parse(lines, line_ind, _next_line)[source]

Parse an eclass block.

tag = None