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

Module distro

source code

Integration with native distribution package managers.


Since: 0.28

Classes
  Cache
  Distribution
Represents a distribution with which we can integrate.
  WindowsDistribution
  DarwinDistribution
  CachedDistribution
For distributions where querying the package database is slow (e.g.
  DebianDistribution
A dpkg-based distribution.
  RPMDistribution
An RPM-based distribution.
  SlackDistribution
A Slack-based distribution.
  ArchDistribution
An Arch Linux distribution.
  GentooDistribution
  PortsDistribution
  MacPortsDistribution
  CygwinDistribution
A Cygwin-based distribution.
Functions
str
try_cleanup_distro_version(version)
Try to turn a distribution version string into one readable by Zero Install.
source code
str
canonical_machine(package_machine) source code
Distribution
get_host_distribution()
Get a Distribution suitable for the host operating system.
source code
Variables
  host_machine = arch.canonicalize_machine(platform.uname() [4])
Function Details

try_cleanup_distro_version(version)

source code 

Try to turn a distribution version string into one readable by Zero Install. We do this by stripping off anything we can't parse.

Parameters:
  • version (str)
Returns: str
the part we understood, or None if we couldn't parse anything

canonical_machine(package_machine)

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

get_host_distribution()

source code 

Get a Distribution suitable for the host operating system. Calling this twice will return the same object.

Returns: Distribution