def _whlify(filename):

    if filename.endswith('.tar.gz'):
        pkg = filename[:-7]
    elif filename.endswith('.tar.bz2'):
        pkg = filename[:-8]
    elif filename.endswith('.zip'):
        pkg = filename[:-4]
    else:
        raise NotImplementedError('filename %s not supported' % filename)

    return u'{pkg}-py{pyvermax}{pyvermin}-none-{platform}'\
            '.whl'.format(pkg=pkg,
                          platform='any',  # XXX should works ! get_platform()
                          pyvermax=sys.version_info[0],
                          pyvermin=sys.version_info[1],
                          )
dataset/ETHPy150Open mardiros/pyshop/pyshop/models.py/_whlify/original