Package zeroinstall :: Package injector :: Module model :: Class DistributionRestriction
[frames] | no frames]

Class DistributionRestriction

source code

 object --+    
          |    
Restriction --+
              |
             DistributionRestriction

A restriction that can only be satisfied by an implementation from the given distribution. For example, a MacPorts Python library requires us to select the MacPorts version of Python too.


Since: 1.15

Instance Methods
 
__init__(self, distros)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
bool
meets_restriction(self, impl)
Called by the solver.Solver to check whether a particular implementation is acceptable.
source code
str
__str__(self)
str(x)
source code

Inherited from Restriction: __repr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables
  distros = None
Create a new digest.

Inherited from Restriction: reason

Properties

Inherited from object: __class__

Method Details

__init__(self, distros)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • distros (str)
Overrides: object.__init__

meets_restriction(self, impl)

source code 

Called by the solver.Solver to check whether a particular implementation is acceptable.

Parameters:
Returns: bool
False if this implementation is not a possibility
Overrides: Restriction.meets_restriction

__str__(self)
(Informal representation operator)

source code 

str(x)

Returns: str
Overrides: object.__str__