def parse_version(*args):
 v = None
 if (len(args) == 1):
  a = args[0]
  if isinstance(a, tuple):
   v = '.'.join((str(x) for x in a))
  else:
   v = str(a)
 else:
  v = '.'.join((str(a) for a in args))
 if v.startswith('v'):
  v = v[1:]
 try:
  return pkg_resources.SetuptoolsVersion(v)
 except AttributeError:
  return pkg_resources.parse_version(v)

def parse_version ( * args ) : v = None if ( len ( args ) == 1 ) : a = args [ 0 ] if isinstance ( a , tuple ) : v = '.' . join ( ( str ( x ) for x in a ) ) else : v = str ( a ) else : v = '.' . join ( ( str ( a ) for a in args ) ) if v . startswith ( 'v' ) : v = v [ 1 : ] try : return pkg_resources . SetuptoolsVersion ( v ) except AttributeError : return pkg_resources . parse_version ( v )
returns a sortable version arguments: args -- a string .