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