U
    `»{j  ã                   @  sJ   d Z ddlmZ ddlZddlmZ ddœdd„Zdd
dddœdd„ZdS )zLProvides a function to report all internal modules for using freezing
tools.é    )ÚannotationsN)ÚIteratorz	list[str])Ú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	   úU/var/www/html/bwave/python/venv/lib/python3.8/site-packages/_pytest/freeze_support.pyÚfreeze_includes
   s    r   Ú zstr | types.ModuleTypeÚstrzIterator[str])ÚpackageÚprefixr   c           
      c  s�   ddl }ddl}t| tƒr | }n| j}|d | jd  }}| |g¡D ]D\}}}|r€t|j 	||¡|d d�D ]}	||	 V  qnqF|| V  qFd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Ú
isinstancer   Ú__path__Ú__name__Úiter_modulesr   ÚpathÚjoin)
r   r   r   r   r   Úpackage_pathÚ_ÚnameÚ
is_packageÚmr	   r	   r
   r      s    
r   )r   )Ú__doc__Ú
__future__r   ÚtypesÚtypingr   r   r   r	   r	   r	   r
   Ú<module>   s    þ