

def mpkg_info(name, version, packages=[]):
    d = common_info(p, version)
    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(('IFPkgFlagPackageLocation', 'IFPkgFlagPackageSelection'), p))
        npackages.append(p)
    d.update(dict(IFPkgFlagComponentDirectory='./Contents/Packages', IFPkgFlagPackageList=npackages))
    return d

dataset/ETHPy150Open ardekantur/pyglet/tools/genmpkg/bdist_mpkg_pyglet/plists.py mpkg_info/VarMisuse@21/26 `name`->`p`