
    O&iA                     |    d dl Z d dlZg dZ	 d dlmZ n# e$ r	 d dlmZ Y nw xY wd Zd Z G d d          Z	d Z
dS )	    N)install
NullFinderProtocol)r   c                 p    t           j                             |                        t                       | S )z
    Class decorator for installation on sys.meta_path.

    Adds the backport DistributionFinder to sys.meta_path and
    attempts to disable the finder functionality of the stdlib
    DistributionFinder.
    )sys	meta_pathappenddisable_stdlib_finder)clss    g/home/geonatureadmin/si_en_reseau/tutos/venv/lib/python3.11/site-packages/importlib_metadata/_compat.pyr   r      s1     MJ    c                  J    d } t          | t          j                  D ]}|`dS )z
    Give the backport primacy for discovering path-based distributions
    by monkey-patching the stdlib O_O.

    See #91 for more background for rationale on this sketchy
    behavior.
    c                 L    t          | dd           dk    ot          | d          S )N
__module___frozen_importlib_externalfind_distributions)getattrhasattr)finders    r   matchesz&disable_stdlib_finder.<locals>.matches%   s8    L$
 
)* T.5f>R.S.S	Tr   N)filterr   r   r   )r   r   s     r   r
   r
      sD    T T T
 #-00 & &%%& &r   c                   ,    e Zd ZdZed             ZeZdS )r   zj
    A "Finder" (aka "MetaClassFinder") that never finds any modules,
    but may find distributions.
    c                      d S )N )argskwargss     r   	find_speczNullFinder.find_spec4   s    tr   N)__name__r   __qualname____doc__staticmethodr   find_moduler   r   r   r   r   .   s:         
   \ KKKr   r   c                 :    t          j                    dk    }| |z   S )zY
    Adjust for variable stacklevel on partial under PyPy.

    Workaround for #327.
    PyPy)platformpython_implementation)valis_pypys     r   pypy_partialr)   A   s!     ,..&8G=r   )r   r%   __all__typingr   ImportErrortyping_extensionsr   r
   r   r)   r   r   r   <module>r.      s    



  0
/
/+ + + +********+

 
 
& & &$       &    s    ##