def mpkg_info(name, version, packages=[]):
    d = common_info(name, version)
    # Keys that can appear only in metapackages
    npackages = []
    for p in packages:
        items = getattr(p, 'items', None)
        if items is not None:
            p = dict(items())
        else:
            if isinstance(p, basestring):
                p = [p]
            p = dict(zip(
                (u'IFPkgFlagPackageLocation', u'IFPkgFlagPackageSelection'),
                p
            ))
        npackages.append(p)
    d.update(dict(
        IFPkgFlagComponentDirectory=u'./Contents/Packages',
        IFPkgFlagPackageList=npackages,
    ))
    return d
dataset/ETHPy150Open ardekantur/pyglet/tools/genmpkg/bdist_mpkg_pyglet/plists.py/mpkg_info/original