def build_metadata_from_setuptools_dict(metadata):
    """Build and return metadata from a setuptools dict.

    This is typically from package metadata.
    """
    project_urls = metadata['project_urls']
    output = {'name': metadata['name'], 'version': metadata['version'],
        'description': metadata['description'], 'homepage': metadata['url'],
        'license': metadata['license'], 'maintainers': metadata['author'],
        'repository': project_urls['Source'], 'issuesurl': project_urls[
        'Tracker']}
    output['contributors'] = metadata.get('contributors', None)
    return output
