Package zeroinstall :: Package injector :: Module selections :: Class Selections
[frames] | no frames]

Class Selections

source code

object --+
         |
        Selections

A selected set of components which will make up a complete program.

Instance Methods
 
__init__(self, source)
Constructor.
source code
 
toDOM(self)
Create a DOM document for the selected implementations.
source code
 
__repr__(self)
repr(x)
source code
[Selection]
get_unavailable_selections(self, config, include_packages)
Find those selections which are not present.
source code
zeroinstall.support.tasks.Blocker | None
download_missing(self, config, _old=None, include_packages=False)
Check all selected implementations are available.
source code
ImplSelection
__getitem__(self, key) source code
 
iteritems(self) source code
zeroinstall.injector.model.Implementation
values(self) source code
 
__iter__(self) source code
zeroinstall.injector.model.Implementation
get(self, iface, if_missing) source code
 
copy(self) source code
 
items(self) source code
 
commands(self) source code

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

Instance Variables
str command
the command to run on 'interface'
str interface
the interface of the program
{str: Selection} selections
the selected implementations
Properties

Inherited from object: __class__

Method Details

__init__(self, source)
(Constructor)

source code 

Constructor.

Parameters:
  • source (Element) - a map of implementations, policy or selections document
Overrides: object.__init__

toDOM(self)

source code 

Create a DOM document for the selected implementations. The document gives the URI of the root, plus each selected implementation. For each selected implementation, we record the ID, the version, the URI and (if different) the feed URL. We also record all the bindings needed.

Returns:
a new DOM Document

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

get_unavailable_selections(self, config, include_packages)

source code 

Find those selections which are not present. Local implementations are available if their directory exists. Other 0install implementations are available if they are in the cache. Package implementations are available if the Distribution says so.

Parameters:
  • include_packages (bool) - whether to include <package-implementation>s
Returns: [Selection]

Since: 1.16

download_missing(self, config, _old=None, include_packages=False)

source code 

Check all selected implementations are available. Download any that are not present. Since native distribution packages are usually only available in a single version, which is unlikely to be the one in the selections document, we ignore them by default. Note: package implementations (distribution packages) are ignored.

Parameters:
  • config - used to get iface_cache, stores and fetcher
  • include_packages (bool) - also try to install native packages (since 1.5)
Returns: zeroinstall.support.tasks.Blocker | None

__getitem__(self, key)
(Indexing operator)

source code 
Parameters:
  • key (str)
Returns: ImplSelection

get(self, iface, if_missing)

source code 
Parameters:
Returns: zeroinstall.injector.model.Implementation

commands(self)

source code 
Decorators:
  • @property