Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/landscape/lib/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/landscape/lib/versioning.pyc

ó
ÍÿŠTc@s,dZddlmZd„Zd„ZdS(s-Helpers for dealing with software versioning.iÿÿÿÿ(t
StrictVersioncCst|ƒt|ƒkS(sCheck if a version is higher than another.

    This takes two software versions in the usual "x.y" form
    and split them on the decimal character, converting both parts
    to ints, e.g. "3.2" becomes (3, 2).

    It then does a comparison of the two tuples, and returns C{True} if
    C{version1} is greater than or equal to C{version2}.

    @param version1: The first version to compare.
    @param version2: The second version to compare.
    @return: C{True} if the first version is greater than or equal to
        the second.
    (R(tversion1tversion2((s</usr/lib/python2.7/dist-packages/landscape/lib/versioning.pytis_version_higherscCsHtg|D]}t|ƒ^q
dtƒ}g|D]}t|ƒ^q2S(s@Sort a list of software versions from the highest to the lowest.treverse(tsortedRtTruetstr(tversionstversiontstrict_versionststrict_version((s</usr/lib/python2.7/dist-packages/landscape/lib/versioning.pyt
sort_versionss(N(t__doc__tdistutils.versionRRR(((s</usr/lib/python2.7/dist-packages/landscape/lib/versioning.pyt<module>s