def get_metadata(dist):
    if not dist.has_metadata('PKG-INFO'):
        return

    msg = email.message_from_string(dist.get_metadata('PKG-INFO'))
    metadata = {}
    for header in [l for l in msg._headers]:
        metadata[header[0]] = header[1]

    return metadata
Return dictionary of metadata for given dist
dataset/ETHPy150Open cakebread/yolk/yolk/metadata.py/get_metadata