

def python_requirement(pkgname, prefix=None, version=None, **kw):
    if (prefix is None):
        prefix = sys.prefix
    if (version is None):
        version = sys.version[:3]
    prefix = os.path.realpath(prefix)
    fmwkprefix = os.path.dirname(os.path.dirname(prefix))
    is_framework = fmwkprefix.endswith('.framework')
    if is_framework:
        dprefix = os.path.dirname(fmwkprefix)
    else:
        dprefix = prefix
    dprefix = tools.unicode_path(dprefix)
    name = ('%s Python %s' % (FRIENDLY_PREFIX.get(dprefix, dprefix), version))
    kw.setdefault('LabelKey', name)
    title = ('%s requires %s to install.' % (pkgname, name))
    kw.setdefault('TitleKey', title)
    kw.setdefault('MessageKey', prefix)
    return path_requirement(prefix, **kw)

dataset/ETHPy150Open ardekantur/pyglet/tools/genmpkg/bdist_mpkg_pyglet/plists.py python_requirement/VarMisuse@185/250 `title`->`prefix`