Package zeroinstall :: Package injector :: Module solver :: Class Solver
[frames] | no frames]

Class Solver

source code

object --+
         |
        Solver

Chooses a set of implementations to satisfy the requirements of a program and its user. Typical use:

  1. Create a Solver object and configure it
  2. Call solve.
  3. If any of the returned feeds_used are stale or missing, you may like to start downloading them
  4. If it is 'ready' then you can download and run the chosen versions.
Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
bool
solve(self, root_interface, arch)
Get the best implementation of root_interface and all of its dependencies.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables
{str: [(Implementation, comment)]} details
extra information, if record_details mode was used
set(str) feeds_used
the feeds which contributed to the choice in selections
{Interface: [(Implementation, str)]} record_details
whether to record information about unselected implementations
{model.Interface: Implementation} selections
the chosen implementation of each interface
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

solve(self, root_interface, arch)

source code 

Get the best implementation of root_interface and all of its dependencies.

Parameters:
  • root_interface (str) - the URI of the program to be solved
  • arch (arch.Architecture) - the desired target architecture
Returns: bool
whether we have a viable selection

Postcondition: self.selections and self.feeds_used are updated