
    e                     t    d Z ddlZddlZddlmZ ddlmZ ddlmZ  ej                  e
      Zddded	efd
Zy)zBFunctions for finding Cookiecutter templates and other components.    N)Path)Environment)NonTemplatedInputDirExceptionrepo_dirzos.PathLike[str]envreturnc                     t         j                  d|        t        j                  |       D ]2  }d|v s|j                  |v s|j
                  |v s&t        | |      } n t        t         j                  d|       |S )zDetermine which child directory of ``repo_dir`` is the project template.

    :param repo_dir: Local directory of newly cloned repo.
    :return: Relative path to project template.
    z&Searching %s for the project template.cookiecutterz%The project template appears to be %s)loggerdebugoslistdirvariable_start_stringvariable_end_stringr   r   )r   r   str_pathproject_templates       1lib/python3.12/site-packages/cookiecutter/find.pyfind_templater      s}     LL98DJJx( 	,h&))X5''83#Hh7	, ,+
LL8:JK    )__doc__loggingr   pathlibr   jinja2r   cookiecutter.exceptionsr   	getLogger__name__r   r    r   r   <module>r      sD    H  	   A			8	$. [ T r   