import re


def aliases(metadata_dict):
    """Return a list of package aliases found in metadata's 'aliases' field."""
    if 'aliases' not in metadata_dict:
        return []

    return re.split(',\s*|\s+', metadata_dict['aliases'])