pkgcore.restrictions.packages module

restriction classes designed for package level matching

class pkgcore.restrictions.packages.Conditional(*args: Hashable, disable_inst_caching=False, **kwargs: Hashable)[source]

Bases: PackageRestriction

Base object representing a conditional package restriction.

Used to control whether a payload of restrictions are accessible or not.

conditional = True
evaluate_conditionals(parent_cls, parent_seq, enabled, tristate_locked=None)[source]
payload
class pkgcore.restrictions.packages.KeyedAndRestriction(*args: Hashable, disable_inst_caching=False, **kwargs: Hashable)[source]

Bases: AndRestriction

type: T_restriction = 'package'
class pkgcore.restrictions.packages.PackageRestriction(*args: Hashable, disable_inst_caching=False, **kwargs: Hashable)[source]

Bases: GenericEquality, base

Package data restriction.

property attr
property attrs
conditional = False
force_False(pkg)[source]
force_True(pkg)[source]
ignore_missing
match(pkg)[source]
negate
restriction
subtype = 'values'
type: T_restriction = 'package'
class pkgcore.restrictions.packages.PackageRestrictionMulti(*args: Hashable, disable_inst_caching=False, **kwargs: Hashable)[source]

Bases: PackageRestriction

attr = None
property attrs
force_False(pkg)[source]
force_True(pkg)[source]