Package zeroinstall :: Package injector :: Module arch
[frames] | no frames]

Module arch

source code

Information about the current system's architecture.

This module provides information about the current system. It is used to determine whether an implementation is suitable for this machine, and to compare different implementations.

For example, it will indicate that:

Each dictionary maps from a supported architecture type to a preference level. Lower numbers are better, Unsupported architectures are not listed at all.

Classes
  Architecture
A description of an architecture.
  SourceArchitecture
Matches source code that creates binaries for a particular architecture.
Functions
str
canonicalize_os(os_) source code
str
canonicalize_machine(machine_) source code
Architecture
get_host_architecture()
Get an Architecture that matches implementations that will run on the host machine.
source code
Architecture
get_architecture(os, machine)
Get an Architecture that matches binaries that will work on the given system.
source code
Variables
  p = sys.platform
  os_ranks = _get_os_ranks(_uname [0])
  machine_groups = {'x86_64': 64, 'ppc64': 64,}
  machine_ranks = _get_machine_ranks(_uname [-1])
Function Details

canonicalize_os(os_)

source code 
Parameters:
  • os_ (str)
Returns: str

canonicalize_machine(machine_)

source code 
Parameters:
  • machine_ (str)
Returns: str

get_architecture(os, machine)

source code 

Get an Architecture that matches binaries that will work on the given system.

Parameters:
  • os (str) - OS type, or None for host's type
  • machine (str) - CPU type, or None for host's type
Returns: Architecture
an Architecture object