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 help(type(x)) for signature
source code
 
solve(self, root_interface, root_arch, command_name='run')
Get the best implementation of root_interface and all of its dependencies.
source code

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

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: [model.Dependency]} requires
the selected dependencies for each chosen version
selections.Selections selections
the chosen implementation of each interface
Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

solve(self, root_interface, root_arch, command_name='run')

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
  • root_arch (arch.Architecture) - the desired target architecture
  • command_name (str | None) - which <command> element to select

Postcondition: self.ready, self.selections and self.feeds_used are updated