U
    42i                     @  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	   :/tmp/pip-unpacked-wheel-7n2p7kht/_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\}}}|rt|j	|||d dD ]}	||	 V  qnqF|| V  qFdS )zIterate 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    