from pathlib import Path
import shutil


def copy_assembly(src, dst):
    """
    Copy the directory passed to src to the dst directory and return the destination path.
    An exception is raised if the dst directory already exists.

    Args:
        src (str): The path of the directory that is copied.
        dst (str): The path of the destination directory.

    Returns:
        The path of the destination directory
    """
    dst = Path(dst)
    if dst.exists() and dst.is_dir():
        raise Exception('destination folder already exists')


    src = Path(src)
    shutil.copytree(src, dst)

    return dst