o
    Ú­j;  ã                   @   sn   d Z ddlZddlmZ ddlmZ ddlmZ dee fdd„Z		dd
eeejf dedee fdd„Z	dS )zLProvides a function to report all internal modules for using freezing
tools.é    N)ÚIterator)ÚList)ÚUnionÚreturnc                  C   s   ddl } tt| ƒƒ}|S )zVReturn a list of module names used by pytest that should be
    included by cx_freeze.r   N)Ú_pytestÚlistÚ_iter_all_modules)r   Úresult© r
   úS/var/www/html/CropPilot/venv/lib/python3.10/site-packages/_pytest/freeze_support.pyÚfreeze_includes	   s   r   Ú ÚpackageÚprefixc           
      c   s’   � ddl }ddl}t| tƒr| }n| j}|d | jd }}| |g¡D ]"\}}}|rAt|j 	||¡|d d�D ]}	||	 V  q8q$|| V  q$dS )zèIterate over the names of all modules that can be found in the given
    package, recursively.

        >>> import _pytest
        >>> list(_iter_all_modules(_pytest))
        ['_pytest._argcomplete', '_pytest._code.code', ...]
    r   NÚ.)r   )
ÚosÚpkgutilÚ
isinstanceÚstrÚ__path__Ú__name__Úiter_modulesr   ÚpathÚjoin)
r   r   r   r   r   Úpackage_pathÚ_ÚnameÚ
is_packageÚmr
   r
   r   r      s   €
ÿûr   )r   )
Ú__doc__ÚtypesÚtypingr   r   r   r   r   Ú
ModuleTyper   r
   r
   r
   r   Ú<module>   s    þÿþý