pkgcore.restrictions.values module¶
value restrictions
Works hand in hand with pkgcore.restrictions.packages
, these
classes match against a value handed in, package restrictions pull the
attr from a package instance and hand it to their wrapped restriction
(which is a value restriction).
- class pkgcore.restrictions.values.ContainmentMatch(*a, **kw)[source]¶
Bases:
base
Used for an ‘in’ style operation.
For example, ‘x86’ in [‘x86’, ‘~x86’]. Note that negation of this does not result in a true NAND when all is on.
- all¶
- negate¶
- vals¶
- pkgcore.restrictions.values.ContainmentMatch2¶
alias of
ContainmentMatch
- class pkgcore.restrictions.values.FlatteningRestriction(*a, **kw)[source]¶
Bases:
base
Flatten the values passed in and apply the nested restriction.
- dont_iter¶
- negate¶
- restriction¶
- class pkgcore.restrictions.values.FunctionRestriction(*a, **kw)[source]¶
Bases:
base
Convenience class for creating special restrictions.
- func¶
- negate¶
- class pkgcore.restrictions.values.GetAttrRestriction(*a, **kw)[source]¶
Bases:
PackageRestriction
Restriction pulling an attribute and applying a child restriction.
- type = 'values'¶
- class pkgcore.restrictions.values.StrConversion(*a, **kw)[source]¶
Bases:
base
convert passed in data to a str object
- restrict¶
- class pkgcore.restrictions.values.StrExactMatch(*a, **kw)[source]¶
Bases:
base
exact string comparison match
- case_sensitive¶
- exact¶
- negate¶
- class pkgcore.restrictions.values.StrGlobMatch(*a, **kw)[source]¶
Bases:
base
globbing matches; essentially startswith and endswith matches
- flags¶
- glob¶
- negate¶
- prefix¶
- class pkgcore.restrictions.values.StrRegex(*a, **kw)[source]¶
Bases:
base
regex based matching
- flags¶
- ismatch¶
- negate¶
- regex¶
- class pkgcore.restrictions.values.UnicodeConversion(*a, **kw)[source]¶
Bases:
StrConversion
convert passed in data to a unicode obj
- class pkgcore.restrictions.values.VersionRestriction(*a, **kw)[source]¶
Bases:
base
use this as base for version restrictions.
Gives a clue to what the restriction does.