Viewing File: /opt/alt/python37/lib/python3.7/site-packages/importlib_metadata/__pycache__/_compat.cpython-37.pyc

B

�&�`,	�@svddlZddddgZyddlmZWn ek
rDddlmZYnXdd�Zdd	�ZGd
d�d�ZGdd�d�Z	dS)�N�install�
NullFinder�	PyPy_repr�Protocol)rcCstj�|��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)�cls�r�K/opt/alt/python37/lib/python3.7/site-packages/importlib_metadata/_compat.pyrscCs&dd�}xt|tj�D]}|`qWdS)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.
    cSst|dd�dkot|d�S)N�
__module__�_frozen_importlib_external�find_distributions)�getattr�hasattr)�finderrrr�matches(sz&disable_stdlib_finder.<locals>.matchesN)�filterrrr)rrrrrr	s	r	c@s eZdZdZedd��ZeZdS)rzj
    A "Finder" (aka "MetaClassFinder") that never finds any modules,
    but may find distributions.
    cOsdS)Nr)�args�kwargsrrr�	find_spec7szNullFinder.find_specN)�__name__r
�__qualname__�__doc__�staticmethodr�find_modulerrrrr1s
c@s,eZdZdZeed�Zdd�Zer&eZ[dS)rzc
    Override repr for EntryPoint objects on PyPy to avoid __iter__ access.
    Ref #97, #102.
    �pypy_version_infocs*�fdd�}d�t|�j��}d|�d�S)Ncst�|�}|�d|��S)N�=)r)�name�value)�selfrr�
make_paramMs
z-PyPy_repr.__compat_repr__.<locals>.make_paramz, zEntryPoint(�))�join�map�_fields)r!r"�paramsr)r!r�__compat_repr__LszPyPy_repr.__compat_repr__N)	rr
rrrrZaffectedr(�__repr__rrrrrDs
)
r�__all__�typingr�ImportError�typing_extensionsrr	rrrrrr�<module>s

Back to Directory File Manager