Example #1
0
def comparable_spec(spec):
    """
    Returns a tuple(version, build) for a distribution, version is a
    RationalVersion object.  The result may be used for as a sort key.
    """
    return comparable_version(spec['version']), spec['build']
Example #2
0
 def vb_egg(fn):
     try:
         n, v, b = dist_naming.split_eggname(fn)
         return comparable_version(v), b
     except:
         return None
Example #3
0
def comparable_spec(spec):
    """
    Returns a tuple(version, build) for a distribution, version is a
    RationalVersion object.  The result may be used for as a sort key.
    """
    return comparable_version(spec['version']), spec['build']
Example #4
0
 def vb_egg(fn):
     try:
         n, v, b = dist_naming.split_eggname(fn)
         return comparable_version(v), b
     except:
         return None
Example #5
0
    def test_single_number(self):
        """Test that we handle versions such as '214' correctly."""
        r_ver = NormalizedVersion("214.0.0")

        ver_string = "214"
        self.assertEqual(comparable_version(ver_string), r_ver)
Example #6
0
    def test_dev_tag_without_number(self):
        """Test that we handle buggy '1.0.0.dev' as if it were '1.0.0.dev1'."""
        r_ver = NormalizedVersion("1.0.0.dev1")

        ver_string = "1.0.0.dev"
        self.assertEqual(comparable_version(ver_string), r_ver)