a
    ˆÏ?e;  ã                   @   sh   d Z ddlZddlmZ ddlmZ ddlmZ ee dœdd„Zdeeejf eee d
œ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
   úY/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/_pytest/freeze_support.pyÚfreeze_includes	   s    r   Ú )Ú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Ú
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    þý