Package linda :: Module dpkgver
[hide private]

Module dpkgver

source code

Parse and compare Debian version strings.

This module contains a class designed to sit in your Python code pretty naturally and represent a Debian version string. It implements various special methods to make dealing with them sweet.


Author: Scott James Remnant <scott@netsplit.com>

Classes [hide private]
  VersionError
  BadInputError
  BadEpochError
  BadUpstreamError
  BadRevisionError
  DpkgVersion
Debian version number.
Functions [hide private]
 
strcut(str, idx, accept)
Cut characters from str that are entirely in accept.
source code
 
deb_order(str, idx)
Return the comparison order of two characters.
source code
 
deb_cmp_str(x, y)
Compare two strings in a deb version.
source code
 
deb_cmp(x, y)
Implement the string comparison outlined by Debian policy.
source code
Variables [hide private]
  valid_epoch = re.compile(r'^[0-9]+$')
  valid_upstream = re.compile(r'^[0-9][A-Za-z0-9\+:\.~-]*$')
  valid_revision = re.compile(r'^[A-Za-z0-9\+\.~]+$')
  cmp_table = '~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv...
Variables Details [hide private]

cmp_table

Value:
'~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-.:'