Creates the authors file, if not in a package.

    Returns:
        None

    Raises:
        RuntimeError: If the authors could not be retrieved

def create_authors(project_dir=os.curdir):
    """
    Creates the authors file, if not in a package.

    Returns:
        None

    Raises:
        RuntimeError: If the authors could not be retrieved
    """
    pkg_info_file = os.path.join(project_dir, 'PKG-INFO')
    authors_file = os.path.join(project_dir, 'AUTHORS')
    if os.path.exists(pkg_info_file):
        return

    authors = get_authors(project_dir=project_dir)
    with open(authors_file, 'wb') as authors_fd:
        authors_fd.write(
            b'\n'.join(a.encode('utf-8') for a in authors) + b'\n'
        )