@staticmethod
    def makeArgs(name, version):
        default = [0,0,0,0] #last number denotes pre-release
        if isinstance(version, Version):
            if version.package == name:
                return (
                    (name, version.major, version.minor, version.micro),
                    {'prerelease': version.prerelease}
                )
            else: version = []
        if isinstance(version, str):
            version = version.split('.')
        elif isinstance(version, tuple):
            version = list(version)
        elif isinstance(version, type(None)):
            version = []
        else:
            raise TypeError('Unacceptable version input %s' % type(version))
        version = version + default #pad the length for comparisons
        v = [ i[0] for i in zip(version, default) ]
        kwargs = {'prerelease': None}
        try: #don't try too hard to get this right
            if len(v) == 4 and v[3]:
                kwargs['prerelease'] = int(v[3])
        except: pass
        return (tuple((name,) + tuple([int(i) for i in v[0:3]])), kwargs)
goes through great lengths to make args for use
dataset/ETHPy150Open OrbitzWorldwide/droned/droned/lib/droned/models/app.py/AppVersion.makeArgs