-
Committer:
John Wright
-
Date:
2010-03-14 04:55:10 UTC
-
Revision ID:
git-v1:08a6909fd18572e490661acc9383dcc4ae159d03
debian_support: Add a native Python Version class
Based on the DpkgVersion class by Raphael Hertzog in
svn://svn.debian.org/qa/trunk/pts/www/bin/common.py r2361
This commit introduces a BaseVersion class, which does the work of
validating version strings against Debian Policy section 5.6.12 (which
was never previously done), splitting the version into its components,
and implementing __repr__, __str__, and __hash__. Subclasses need only
implement __cmp__, and they have access to the pre-split components.
Closes: #562257, #573009