예제 #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']
예제 #2
0
 def vb_egg(fn):
     try:
         n, v, b = dist_naming.split_eggname(fn)
         return comparable_version(v), b
     except:
         return None
예제 #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']
예제 #4
0
 def vb_egg(fn):
     try:
         n, v, b = dist_naming.split_eggname(fn)
         return comparable_version(v), b
     except:
         return None
예제 #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)
예제 #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)