Files
deb-python-semantic-version/semantic_version/compat.py
Raphaël Barrois ed74d6c409 Update copyright
2014-03-08 21:14:24 +01:00

19 lines
420 B
Python

# -*- coding: utf-8 -*-
# Copyright (c) 2012-2014 The python-semanticversion project
# This code is distributed under the two-clause BSD License.
import sys
is_python2 = (sys.version_info[0] == 2)
if is_python2: # pragma: no cover
base_cmp = cmp
else: # pragma: no cover
def base_cmp(x, y):
if x < y:
return -1
elif x > y:
return 1
else:
return 0