
    .Ph!                     J    d dl Z d dlZddgZd Zd Z G d d          Zd ZdS )    Ninstall
NullFinderc                 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    Z/var/www/html/test/jupyter/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dS )r   zi
    A "Finder" (aka "MetaPathFinder") that never finds any modules,
    but may find distributions.
    c                      d S )N )argskwargss     r   	find_speczNullFinder.find_spec,   s    tr   N)__name__r   __qualname____doc__staticmethodr   r   r   r   r   r   &   s9         
   \  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'   1   s!     ,..&8G=r   )r#   r   __all__r   r	   r   r'   r   r   r   <module>r)      s     



l
#
 
 
& & &$           r   