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:
baseUsed 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:
baseFlatten the values passed in and apply the nested restriction.
- dont_iter¶
- negate¶
- restriction¶
- class pkgcore.restrictions.values.FunctionRestriction(*a, **kw)[source]¶
Bases:
baseConvenience class for creating special restrictions.
- func¶
- negate¶
- class pkgcore.restrictions.values.GetAttrRestriction(*a, **kw)[source]¶
Bases:
PackageRestrictionRestriction pulling an attribute and applying a child restriction.
- type = 'values'¶
- class pkgcore.restrictions.values.StrConversion(*a, **kw)[source]¶
Bases:
baseconvert passed in data to a str object
- restrict¶
- class pkgcore.restrictions.values.StrExactMatch(*a, **kw)[source]¶
Bases:
baseexact string comparison match
- case_sensitive¶
- exact¶
- negate¶
- class pkgcore.restrictions.values.StrGlobMatch(*a, **kw)[source]¶
Bases:
baseglobbing matches; essentially startswith and endswith matches
- flags¶
- glob¶
- negate¶
- prefix¶
- class pkgcore.restrictions.values.StrRegex(*a, **kw)[source]¶
Bases:
baseregex based matching
- flags¶
- ismatch¶
- negate¶
- regex¶
- class pkgcore.restrictions.values.UnicodeConversion(*a, **kw)[source]¶
Bases:
StrConversionconvert passed in data to a unicode obj
- class pkgcore.restrictions.values.VersionRestriction(*a, **kw)[source]¶
Bases:
baseuse this as base for version restrictions.
Gives a clue to what the restriction does.