Hacked By AnonymousFox

Current Path : /opt/alt/python311/lib64/python3.11/importlib/metadata/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/importlib/metadata/__pycache__/__init__.cpython-311.pyc

�

c��f�y���ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlmZmZddlmZmZddlmZmZddlmZmZddlmZmZddlmZdd	lm Z dd
l!m"Z"ddlm#Z#ddl$m%Z%m&Z&m'Z'm(Z(gd
�Z)Gd�de*��Z+Gd�d��Z,Gd�d��Z-Gd�de-��Z.Gd�de/��Z0Gd�de0��Z1Gd�d��Z2Gd�de2e3��Z4Gd�dej5��Z6Gd �d!��Z7Gd"�d#��Z8Gd$�d%e"��Z9Gd&�d'��Z:Gd(�d)��Z;Gd*�d+��Z<Gd,�d-e9��Z=Gd.�d/e8��Z>d0�Z?d1�Z@d2ejfd3�ZAd4�ZBejCeejDd5���6��ZE	d2e(e1e4ffd7�ZFd8�ZGd9�ZHd2e&eIe%eIffd:�ZJd;�ZKd<�ZLdS)=�N�)�	_adapters�_meta)�FreezableDefaultDict�Pair)�method_cache�	pass_none)�always_iterable�unique_everseen)�PackageMetadata�
SimplePath)�suppress)�
import_module)�MetaPathFinder)�starmap)�List�Mapping�Optional�Union)�Distribution�DistributionFinderr�PackageNotFoundError�distribution�
distributions�entry_points�files�metadata�packages_distributions�requires�versionc�.�eZdZdZd�Zed���ZdS)rzThe package was not found.c��d|j��S)Nz"No package metadata was found for ��name��selfs �B/opt/alt/python311/lib64/python3.11/importlib/metadata/__init__.py�__str__zPackageNotFoundError.__str__1s��?�D�I�?�?�?�c��|j\}|S�N)�args�r&r$s  r'r$zPackageNotFoundError.name4s���)����r)N)�__name__�
__module__�__qualname__�__doc__r(�propertyr$�r)r'rr.sG������$�$�@�@�@�����X���r)rc��eZdZdZejd�����Zed���Z	e
dd���Ze
d���ZdS)�	Sectioneda�
    A simple entry point config parser for performance

    >>> for item in Sectioned.read(Sectioned._sample):
    ...     print(item)
    Pair(name='sec1', value='# comments ignored')
    Pair(name='sec1', value='a = 1')
    Pair(name='sec1', value='b = 2')
    Pair(name='sec2', value='a = 2')

    >>> res = Sectioned.section_pairs(Sectioned._sample)
    >>> item = next(res)
    >>> item.name
    'sec1'
    >>> item.value
    Pair(name='a', value='1')
    >>> item = next(res)
    >>> item.value
    Pair(name='b', value='2')
    >>> item = next(res)
    >>> item.name
    'sec2'
    >>> item.value
    Pair(name='a', value='2')
    >>> list(res)
    []
    zm
        [sec1]
        # comments ignored
        a = 1
        b = 2

        [sec2]
        a = 2
        c�N�d�|�||j���D��S)Nc3�~K�|]8}|j�	|�tj|j�����V��9dS)N)�value)r$�_replacer�parser8)�.0�sections  r'�	<genexpr>z*Sectioned.section_pairs.<locals>.<genexpr>esS����
�
���|�'�
���4�:�g�m�#<�#<��=�=�'�'�'�'�
�
r))�filter_)�read�valid)�cls�texts  r'�
section_pairszSectioned.section_pairscs5��
�
��8�8�D�#�)�8�<�<�
�
�
�	
r)Nc#�4K�t|ttj|�������}d}|D]V}|�d��o|�d��}|r|�d��}�Dt||��V��WdS)N�[�]z[])�filter�map�str�strip�
splitlines�
startswith�endswithr)rBr>�linesr$r8�
section_matchs      r'r?zSectioned.readks������w��C�I�t���/@�/@� A� A�B�B�����	$�	$�E�!�,�,�S�1�1�I�e�n�n�S�6I�6I�M��
��{�{�4�(�(����t�U�#�#�#�#�#�#�	$�	$r)c�2�|o|�d��S)N�#)rL)�lines r'r@zSectioned.validvs���0�D�O�O�C�0�0�0�0r)r+)
r.r/r0r1�textwrap�dedent�lstrip�_sample�classmethodrC�staticmethodr?r@r3r)r'r5r5:s���������8�h�o�	�
�
�
�f�h�h���
�
��[�
��$�$�$��\�$��1�1��\�1�1�1r)r5c�J�eZdZdZejejded���Z	d�Z
dS)�DeprecatedTuplea
    Provide subscript item access for backward compatibility.

    >>> recwarn = getfixture('recwarn')
    >>> ep = EntryPoint(name='name', value='value', group='group')
    >>> ep[:]
    ('name', 'value', 'group')
    >>> ep[0]
    'name'
    >>> len(recwarn)
    1
    zAEntryPoint tuple interface is deprecated. Access members by name.���
stacklevelc�^�|���|���|Sr+)�_warn�_key)r&�items  r'�__getitem__zDeprecatedTuple.__getitem__�s"���
�
�����y�y�{�{�4� � r)N)r.r/r0r1�	functools�partial�warnings�warn�DeprecationWarningr_rbr3r)r'rZrZ{sV��������
�I���
�K���	
�
�
�E�!�!�!�!�!r)rZc���eZdZUdZejd��Z	eed<eed<eed<dZ	e
ded<d	�Zd
�Ze
d���Ze
d���Ze
d
���Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)�
EntryPointa�An entry point as defined by Python packaging conventions.

    See `the packaging docs on entry points
    <https://packaging.python.org/specifications/entry-points/>`_
    for more information.

    >>> ep = EntryPoint(
    ...     name=None, group=None, value='package.module:attr [extra1, extra2]')
    >>> ep.module
    'package.module'
    >>> ep.attr
    'attr'
    >>> ep.extras
    ['extra1', 'extra2']
    zH(?P<module>[\w.]+)\s*(:\s*(?P<attr>[\w.]+)\s*)?((?P<extras>\[.*\])\s*)?$r$r8�groupNr�distc�P�t|���|||���dS)N�r$r8rj��vars�update)r&r$r8rjs    r'�__init__zEntryPoint.__init__�s)���T�
�
���t�5���>�>�>�>�>r)c�*�|j�|j��}t|�d����}td|�d��pd�d����}tjt||��S)z�Load the entry point from its definition. If only a module
        is indicated by the value, return that module. Otherwise,
        return the named object.
        �moduleN�attr��.)
�pattern�matchr8rrjrG�splitrc�reduce�getattr)r&rxrs�attrss    r'�loadzEntryPoint.load�sw��
��"�"�4�:�.�.���u�{�{�8�4�4�5�5���t�e�k�k�&�1�1�7�R�>�>�s�C�C�D�D�������7�7�7r)c�j�|j�|j��}|�d��S)Nrs�rwrxr8rj�r&rxs  r'rszEntryPoint.module�s+����"�"�4�:�.�.���{�{�8�$�$�$r)c�j�|j�|j��}|�d��S)Nrtrr�s  r'rtzEntryPoint.attr�s+����"�"�4�:�.�.���{�{�6�"�"�"r)c��|j�|j��}tjd|�d��pd��S)Nz\w+�extrasru)rwrxr8�re�findallrjr�s  r'r�zEntryPoint.extras�s<����"�"�4�:�.�.���z�&�%�+�+�h�"7�"7�"=�2�>�>�>r)c�L�t|���|���|S)N�rkrn)r&rks  r'�_forzEntryPoint._for�s$���T�
�
���t��$�$�$��r)c�f�d}tj|t��t|j|f��S)zP
        Supply iter so one may construct dicts of EntryPoints by name.
        zJConstruction of dict of EntryPoints is deprecated in favor of EntryPoints.)rerfrg�iterr$)r&�msgs  r'�__iter__zEntryPoint.__iter__�s6��

$�	�	�
�c�-�.�.�.��T�Y��%�&�&�&r)c����fd�|D��}tttj|���|����S)a$
        EntryPoint matches the given parameters.

        >>> ep = EntryPoint(group='foo', name='bar', value='bing:bong [extra1, extra2]')
        >>> ep.matches(group='foo')
        True
        >>> ep.matches(name='bar', value='bing:bong [extra1, extra2]')
        True
        >>> ep.matches(group='foo', name='other')
        False
        >>> ep.matches()
        True
        >>> ep.matches(extras=['extra1', 'extra2'])
        True
        >>> ep.matches(module='bing')
        True
        >>> ep.matches(attr='bong')
        True
        c3�8�K�|]}t�|��V��dSr+�r{)r;�paramr&s  �r'r=z%EntryPoint.matches.<locals>.<genexpr>s-�����:�:�%���u�%�%�:�:�:�:�:�:r))�allrH�operator�eq�values)r&�paramsr|s`  r'�matcheszEntryPoint.matches�sB���(;�:�:�:�6�:�:�:���3�x�{�F�M�M�O�O�U�;�;�<�<�<r)c�*�|j|j|jfSr+rmr%s r'r`zEntryPoint._keys���y�$�*�d�j�0�0r)c�V�|���|���kSr+�r`�r&�others  r'�__lt__zEntryPoint.__lt__s���y�y�{�{�U�Z�Z�\�\�)�)r)c�V�|���|���kSr+r�r�s  r'�__eq__zEntryPoint.__eq__	s���y�y�{�{�e�j�j�l�l�*�*r)c� �td���)Nz!EntryPoint objects are immutable.)�AttributeError)r&r$r8s   r'�__setattr__zEntryPoint.__setattr__s���@�A�A�Ar)c�8�d|j�d|j�d|j�d�S)NzEntryPoint(name=z, value=z, group=�)rmr%s r'�__repr__zEntryPoint.__repr__s<��
%�t�y�
%�
%�D�J�
%�
%��Z�
%�
%�
%�	
r)c�D�t|�����Sr+)�hashr`r%s r'�__hash__zEntryPoint.__hash__s���D�I�I�K�K� � � r))r.r/r0r1r��compilerwrI�__annotations__rkrrqr}r2rsrtr�r�r�r�r`r�r�r�r�r�r3r)r'riri�sj��������� �b�j�	%���G�
� �I�I�I��J�J�J��J�J�J�%)�D�(�>�
"�)�)�)�?�?�?�8�8�8��%�%��X�%��#�#��X�#��?�?��X�?����	'�	'�	'�=�=�=�.1�1�1�*�*�*�+�+�+�B�B�B�
�
�
�!�!�!�!�!r)ric����eZdZdZdZejejde	d���Z
def�fd�Ze
���eed�������d	�Zd
�Z�xZS)�DeprecatedLista>
    Allow an otherwise immutable object to implement mutability
    for compatibility.

    >>> recwarn = getfixture('recwarn')
    >>> dl = DeprecatedList(range(3))
    >>> dl[0] = 1
    >>> dl.append(3)
    >>> del dl[3]
    >>> dl.reverse()
    >>> dl.sort()
    >>> dl.extend([4])
    >>> dl.pop(-1)
    4
    >>> dl.remove(1)
    >>> dl += [5]
    >>> dl + [6]
    [1, 2, 5, 6]
    >>> dl + (6,)
    [1, 2, 5, 6]
    >>> dl.insert(0, 0)
    >>> dl
    [0, 1, 2, 5]
    >>> dl == [0, 1, 2, 5]
    True
    >>> dl == (0, 1, 2, 5)
    True
    >>> len(recwarn)
    1
    r3zAEntryPoints list interface is deprecated. Cast to list if needed.r[r\�method_namec������fd�}�|fS)Nc�p��|���tt�����|i|��Sr+)r_r{�super)r&r,�kwargs�	__class__r�s   ��r'�wrappedz7DeprecatedList._wrap_deprecated_method.<locals>.wrappedCs3����J�J�L�L�L�0�7�5�7�7�K�0�0�$�A�&�A�A�Ar)r3)r�r�r�s` �r'�_wrap_deprecated_methodz&DeprecatedList._wrap_deprecated_methodBs5����	B�	B�	B�	B�	B�	B��G�#�#r)zM__setitem__ __delitem__ append reverse extend pop remove __iadd__ insert sortc��t|t��s#|���t|��}|�t|��|z��Sr+)�
isinstance�tupler_r�r�s  r'�__add__zDeprecatedList.__add__QsI���%��'�'�	!��J�J�L�L�L��%�L�L�E��~�~�e�D�k�k�E�1�2�2�2r)c��t|t��s#|���t|��}t|���|��Sr+)r�r�r_r�r�s  r'r�zDeprecatedList.__eq__WsF���%��'�'�	!��J�J�L�L�L��%�L�L�E��T�{�{�!�!�%�(�(�(r))r.r/r0r1�	__slots__rcrdrerfrgr_rIr��localsrprHryr�r��
__classcell__�r�s@r'r�r�s����������>�I��I���
�K���	
�
�
�E�$�S�$�$�$�$�$�$��F�H�H�O�O���#�
#�#(�5�7�7�	
�	
����3�3�3�)�)�)�)�)�)�)r)r�c���eZdZdZdZ�fd�Zd�Zed���Zed���Z	e
d���Zed���Z
�xZS)	�EntryPointszC
    An immutable collection of selectable EntryPoint objects.
    r3c�D��t|t��r=tjdtd���t���|��S	tt|�	|�������S#t$rt|���wxYw)z;
        Get the EntryPoint in self matching name.
        zGAccessing entry points by index is deprecated. Cast to tuple if needed.r[r\r#)r��intrerfrgr�rb�nextr��select�
StopIteration�KeyError�r&r$r�s  �r'rbzEntryPoints.__getitem__fs�����d�C� � �	-��M�+�"��	
�
�
�
��7�7�&�&�t�,�,�,�	!���T�[�[�d�[�3�3�4�4�5�5�5���	!�	!�	!��4�.�.� �	!���s�/B�Bc�:��t�fd�|D����S)zv
        Select entry points from self that match the
        given parameters (typically group and/or name).
        c3�6�K�|]}|jdi����|V��dS�Nr3)r�)r;�epr�s  �r'r=z%EntryPoints.select.<locals>.<genexpr>|s:�����E�E�"�
��
�0D�0D�V�0D�0D�E�2�E�E�E�E�E�Er)�r��r&r�s `r'r�zEntryPoints.selectws(���
�E�E�E�E��E�E�E�E�E�Er)c��d�|D��S)zB
        Return the set of all names of all entry points.
        c��h|]	}|j��
Sr3r#�r;r�s  r'�	<setcomp>z$EntryPoints.names.<locals>.<setcomp>�s��'�'�'�B���'�'�'r)r3r%s r'�nameszEntryPoints.names~s��
(�'�$�'�'�'�'r)c��d�|D��S)z�
        Return the set of all groups of all entry points.

        For coverage while SelectableGroups is present.
        >>> EntryPoints().groups
        set()
        c��h|]	}|j��
Sr3)rjr�s  r'r�z%EntryPoints.groups.<locals>.<setcomp>�s��(�(�(�R���(�(�(r)r3r%s r'�groupszEntryPoints.groups�s��)�(�4�(�(�(�(r)c�X��|�fd�|�|��D����S)Nc3�B�K�|]}|����V��dSr+)r�)r;r�rks  �r'r=z-EntryPoints._from_text_for.<locals>.<genexpr>�s-�����@�@�R�2�7�7�4�=�=�@�@�@�@�@�@r))�
_from_text)rArBrks  `r'�_from_text_forzEntryPoints._from_text_for�s4����s�@�@�@�@�3�>�>�$�+?�+?�@�@�@�@�@�@r)c�N�d�t�|pd��D��S)Nc3�lK�|]/}t|jj|jj|j���V��0dS)rmN)rir8r$)r;ras  r'r=z)EntryPoints._from_text.<locals>.<genexpr>�sP����
�
��
�D�J�O�4�:�3C�4�9�U�U�U�
�
�
�
�
�
r)ru)r5rC)rBs r'r�zEntryPoints._from_text�s5��
�
�!�/�/��
��;�;�
�
�
�	
r))r.r/r0r1r�rbr�r2r�r�rWr�rXr�r�r�s@r'r�r�_s�����������I�!�!�!�!�!�"F�F�F��(�(��X�(��)�)��X�)��A�A��[�A��
�
��\�
�
�
�
�
r)r�c���eZdZdZejejded���Z	�fd�Z
d�fd�	Z�fd�Z�fd	�Z
�fd
�Z�fd�Z�xZS)
�
Deprecateda�
    Compatibility add-in for mapping to indicate that
    mapping behavior is deprecated.

    >>> recwarn = getfixture('recwarn')
    >>> class DeprecatedDict(Deprecated, dict): pass
    >>> dd = DeprecatedDict(foo='bar')
    >>> dd.get('baz', None)
    >>> dd['foo']
    'bar'
    >>> list(dd)
    ['foo']
    >>> list(dd.keys())
    ['foo']
    >>> 'foo' in dd
    True
    >>> list(dd.values())
    ['bar']
    >>> len(recwarn)
    1
    z:SelectableGroups dict interface is deprecated. Use select.r[r\c�n��|���t���|��Sr+)r_r�rbr�s  �r'rbzDeprecated.__getitem__�s(����
�
�����w�w�"�"�4�(�(�(r)Nc�p��|���t���||��Sr+)r_r��get)r&r$�defaultr�s   �r'r�zDeprecated.get�s(����
�
�����w�w�{�{�4��)�)�)r)c�l��|���t�����Sr+)r_r�r��r&r�s �r'r�zDeprecated.__iter__�s&����
�
�����w�w���!�!�!r)c�X��|���t��j|�Sr+)r_r��__contains__)r&r,r�s  �r'r�zDeprecated.__contains__�s$����
�
����#�u�w�w�#�T�*�*r)c�l��|���t�����Sr+)r_r��keysr�s �r'r�zDeprecated.keys�s"����
�
�����w�w�|�|�~�~�r)c�l��|���t�����Sr+)r_r�r�r�s �r'r�zDeprecated.values�s$����
�
�����w�w�~�~���r)r+)r.r/r0r1rcrdrerfrgr_rbr�r�r�r�r�r�r�s@r'r�r��s����������,
�I���
�D���	
�
�
�E�)�)�)�)�)�*�*�*�*�*�*�"�"�"�"�"�+�+�+�+�+������ � � � � � � � � r)r�c�z��eZdZdZed���Ze�fd���Zed���Zed���Z	d�Z
�xZS)�SelectableGroupszs
    A backward- and forward-compatible result from
    entry_points that fully implements the dict interface.
    c��tjd��}t||���}tj||��}|d�|D����S)Nrj��keyc3�>K�|]\}}|t|��fV��dSr+r�)r;rj�epss   r'r=z(SelectableGroups.load.<locals>.<genexpr>�s3����G�G����E�;�s�+�+�,�G�G�G�G�G�Gr))r��
attrgetter�sorted�	itertools�groupby)rAr��by_group�ordered�groupeds     r'r}zSelectableGroups.load�sU���&�w�/�/����(�+�+�+���#�G�X�6�6���s�G�G�w�G�G�G�G�G�Gr)c���tt|�����}ttj�|����S)zH
        Reconstruct a list of all entrypoints from the groups.
        )r�r�r�r�r��chain�
from_iterable)r&r�r�s  �r'�_allzSelectableGroups._all�s>���
�z�4�(�(�/�/�1�1���9�?�8�8��@�@�A�A�Ar)c��|jjSr+)r�r�r%s r'r�zSelectableGroups.groups�s
���y��r)c��|jjS)zR
        for coverage:
        >>> SelectableGroups().names
        set()
        )r�r�r%s r'r�zSelectableGroups.names�s���y��r)c�.�|s|S|jjdi|��Sr�)r�r�r�s  r'r�zSelectableGroups.select�s*���	��K��t�y��)�)�&�)�)�)r))r.r/r0r1rWr}r2r�r�r�r�r�r�s@r'r�r��s����������
�H�H��[�H��B�B�B�B��X�B�� � ��X� �����X��*�*�*�*�*�*�*r)r�c�&�eZdZdZdd�Zd�Zd�ZdS)�PackagePathz"A reference to a path in a package�utf-8c��|����|���5}|���cddd��S#1swxYwYdS)N��encoding��locate�openr?)r&r�streams   r'�	read_textzPackagePath.read_text�s���
�[�[�]�]�
�
��
�
2�
2�	!�f��;�;�=�=�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!s�A
�
A�Ac��|����d��5}|���cddd��S#1swxYwYdS)N�rbr)r&rs  r'�read_binaryzPackagePath.read_binarys���
�[�[�]�]�
�
��
%�
%�	!���;�;�=�=�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!�	!����	!�	!�	!�	!�	!�	!s�A	�	A
�A
c�6�|j�|��S)z'Return a path-like object for this path)rk�locate_filer%s r'rzPackagePath.locates���y�$�$�T�*�*�*r)N)r�)r.r/r0r1rr	rr3r)r'r�r��sL������,�,�!�!�!�!�!�!�!�+�+�+�+�+r)r�c��eZdZd�Zd�ZdS)�FileHashc�L�|�d��\|_}|_dS)N�=)�	partition�moder8)r&�spec�_s   r'rqzFileHash.__init__s"��#'�>�>�#�#6�#6� ��	�1�d�j�j�jr)c�(�d|j�d|j�d�S)Nz<FileHash mode: z value: �>)rr8r%s r'r�zFileHash.__repr__s��B�$�)�B�B�T�Z�B�B�B�Br)N)r.r/r0rqr�r3r)r'r
r
s7������7�7�7�C�C�C�C�Cr)r
c��eZdZdZejd���Zejd���Zede	fd���Z
ed���Zed���Z
ed���Zed	ejfd
���Zed���Zed���Zed
���Zed���Zed���Zd�Zd�Zed���Zd�Zd�Zed���Zed���ZdS)rzA Python distribution package.c��dS)z�Attempt to load metadata file given by the name.

        :param filename: The name of the file in the distribution info.
        :return: The text if found, otherwise None.
        Nr3�r&�filenames  r'rzDistribution.read_text����r)c��dS)z[
        Given a path to a file in this distribution, return a path
        to it.
        Nr3�r&�paths  r'rzDistribution.locate_filerr)r$c��|std���	t|�|�����S#t$rt	|���wxYw)a�Return the Distribution for the given package name.

        :param name: The name of the distribution package to search for.
        :return: The Distribution instance (or subclass thereof) for the named
            package, if found.
        :raises PackageNotFoundError: When the named package's distribution
            metadata cannot be found.
        :raises ValueError: When an invalid value is supplied for name.
        z A distribution name is required.r#)�
ValueErrorr��discoverr�r)rAr$s  r'�	from_namezDistribution.from_name%sf���	A��?�@�@�@�	-�����$��/�/�0�0�0���	-�	-�	-�&�t�,�,�,�	-���s	�"6�Ac���|�dd����r|rtd����ptjdi|���tj��fd�|���D����S)aReturn an iterable of Distribution objects for all packages.

        Pass a ``context`` or pass keyword arguments for constructing
        a context.

        :context: A ``DistributionFinder.Context`` object.
        :return: Iterable of Distribution objects for all packages.
        �contextNz cannot accept context and kwargsc3�.�K�|]}|���V��dSr+r3)r;�resolverr#s  �r'r=z(Distribution.discover.<locals>.<genexpr>Es>�����-
�-
�"*�H�H�W���-
�-
�-
�-
�-
�-
r)r3)�poprr�Contextr�r�r��_discover_resolvers)rAr�r#s  @r'r zDistribution.discover7s�����*�*�Y��-�-���	A�v�	A��?�@�@�@��A�/�7�A�A�&�A�A����,�,�-
�-
�-
�-
�.1�.E�.E�.G�.G�-
�-
�-
�
�
�	
r)c�D�ttj|����S)z�Return a Distribution for the indicated metadata path

        :param path: a string or path-like object
        :return: a concrete Distribution instance for the path
        )�PathDistribution�pathlib�Path)rs r'�atzDistribution.atIs�� ���T� 2� 2�3�3�3r)c�N�d�tjD��}td|��S)z#Search the meta_path for resolvers.c3�8K�|]}t|dd��V��dS)�find_distributionsNr�)r;�finders  r'r=z3Distribution._discover_resolvers.<locals>.<genexpr>Us@����
�
�<B�G�F�0�$�7�7�
�
�
�
�
�
r)N)�sys�	meta_pathrG)�declareds r'r(z Distribution._discover_resolversRs4��
�
�FI�m�
�
�
���d�H�%�%�%r)�returnc���|�d��p)|�d��p|�d��}tjtj|����S)z�Return the parsed metadata for this Distribution.

        The returned object will have keys that name the various bits of
        metadata.  See PEP 566 for details.
        �METADATAzPKG-INFOru)rr�Message�email�message_from_string�r&rBs  r'rzDistribution.metadataZs`��
�N�N�:�&�&�
"��~�~�j�)�)�
"�
�~�~�b�!�!�
	
�� ��!:�4�!@�!@�A�A�Ar)c��|jdS)z8Return the 'Name' metadata for the distribution package.�Name�rr%s r'r$zDistribution.nameks���}�V�$�$r)c�@�t�|j��S)z(Return a normalized version of the name.)�Prepared�	normalizer$r%s r'�_normalized_namezDistribution._normalized_nameps���!�!�$�)�,�,�,r)c��|jdS)z;Return the 'Version' metadata for the distribution package.�Versionr>r%s r'r zDistribution.versionus���}�Y�'�'r)c�^�t�|�d��|��S)Nzentry_points.txt)r�r�rr%s r'rzDistribution.entry_pointszs%���)�)�$�.�.�9K�*L�*L�d�S�S�Sr)c����d�fd�	�t�fd���}|����p������S)aBFiles in this distribution.

        :return: List of PackagePath for this distribution or None

        Result is `None` if the metadata file that enumerates files
        (i.e. RECORD for dist-info or SOURCES.txt for egg-info) is
        missing.
        Result may be empty if the metadata exists but is empty.
        Nc���t|��}|rt|��nd|_|rt|��nd|_�|_|Sr+)r�r
r�r��sizerk)r$r��size_str�resultr&s    �r'�	make_filez%Distribution.files.<locals>.make_file�sH��� ��&�&�F�,0�:�(�4�.�.�.�d�F�K�+3�=�#�h�-�-�-��F�K��F�K��Mr)c�b��tt�tj|������Sr+)�listr�csv�reader)rNrKs �r'�
make_filesz&Distribution.files.<locals>.make_files�s%�����	�3�:�e�+<�+<�=�=�>�>�>r))NN)r	�_read_files_distinfo�_read_files_egginfo)r&rPrKs` @r'rzDistribution.files~sv����	�	�	�	�	�	�
�	?�	?�	?�	?�
��	?��z�$�3�3�5�5�S��9Q�9Q�9S�9S�T�T�Tr)c�X�|�d��}|o|���S)z*
        Read the lines of RECORD
        �RECORD)rrKr;s  r'rQz!Distribution._read_files_distinfo�s*���~�~�h�'�'���)����)�)�)r)c�~�|�d��}|o&tdj|�����S)z`
        SOURCES.txt might contain literal commas, so wrap each line
        in quotes.
        zSOURCES.txtz"{}")rrH�formatrKr;s  r'rRz Distribution._read_files_egginfo�s6��
�~�~�m�,�,���=��F�M�4�?�?�+<�+<�=�=�=r)c�t�|���p|���}|ot|��S)z6Generated requirements specified for this Distribution)�_read_dist_info_reqs�_read_egg_info_reqsrM)r&�reqss  r'rzDistribution.requires�s7���(�(�*�*�H�d�.F�.F�.H�.H���"��T�
�
�"r)c�6�|j�d��S)Nz
Requires-Dist)r�get_allr%s r'rXz!Distribution._read_dist_info_reqs�s���}�$�$�_�5�5�5r)c�f�|�d��}t|j��|��S)Nzrequires.txt)rr	�_deps_from_requires_text)r&�sources  r'rYz Distribution._read_egg_info_reqs�s.������/�/��7�y��6�7�7��?�?�?r)c�\�|�t�|����Sr+)�%_convert_egg_info_reqs_to_simple_reqsr5r?)rAr_s  r'r^z%Distribution._deps_from_requires_text�s"���8�8�����9O�9O�P�P�Pr)c#��K�d���fd�}d�}|D]/}||j��}|j|z||j��zV��0dS)a�
        Historically, setuptools would solicit and store 'extra'
        requirements, including those with environment markers,
        in separate sections. More modern tools expect each
        dependency to be defined separately, with any relevant
        extras and environment markers attached directly to that
        requirement. This method converts the former to the
        latter. See _test_deps_from_requires_text for an example.
        c��|od|�d�S)Nz
extra == "�"r3r#s r'�make_conditionzJDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.make_condition�s���0�0��0�0�0�0r)c	����|pd}|�d��\}}}|r|rd|�d�}ttd|�|��g����}|rdd�|��zndS)Nru�:�(r�z; z and )rrMrG�join)r<�extra�sep�markers�
conditionsres     �r'�
quoted_markerzIDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.quoted_marker�s�����m��G�")�"3�"3�C�"8�"8��E�3���
)��
)�(�g�.�.�.���f�T�G�^�^�E�5J�5J�+K�L�L�M�M�J�6@�H�4�'�,�,�z�2�2�2�2�b�Hr)c��dd|vzS)z�
            PEP 508 requires a space between the url_spec and the quoted_marker.
            Ref python/importlib_metadata#357.
            � �@r3)�reqs r'�
url_req_spacezIDistribution._convert_egg_info_reqs_to_simple_reqs.<locals>.url_req_space�s���#��*�%�%r)N)r8r$)�sectionsrnrsr<�spaceres     @r'raz2Distribution._convert_egg_info_reqs_to_simple_reqs�s������	1�	1�	1�	I�	I�	I�	I�	I�	&�	&�	&� �	F�	F�G�!�M�'�-�0�0�E��-�%�'�-�-���*E�*E�E�E�E�E�E�	F�	Fr)N)r.r/r0r1�abc�abstractmethodrrrWrIr!r rXr-r(r2rrrr$rBr rrrQrRrrXrYr^rar3r)r'rrs"������(�(��������	��������-�S�-�-�-��[�-�"�
�
��[�
�"�4�4��\�4��&�&��\�&��B�%�/�B�B�B��X�B� �%�%��X�%��-�-��X�-��(�(��X�(��T�T��X�T��U�U��X�U�0*�*�*�>�>�>��#�#��X�#�
6�6�6�@�@�@��Q�Q��[�Q�� F� F��\� F� F� Fr)rc�`�eZdZdZGd�d��Zeje��fd���ZdS)rzJ
    A MetaPathFinder capable of discovering installed distributions.
    c�4�eZdZdZdZ	d�Zed���ZdS)�DistributionFinder.Contextaw
        Keyword arguments presented by the caller to
        ``distributions()`` or ``Distribution.discover()``
        to narrow the scope of a search for distributions
        in all DistributionFinders.

        Each DistributionFinder may expect any parameters
        and should attempt to honor the canonical
        parameters defined below when appropriate.
        Nc�J�t|���|��dSr+rn)r&r�s  r'rqz#DistributionFinder.Context.__init__�s"����J�J���f�%�%�%�%�%r)c�\�t|���dtj��S)z�
            The sequence of directory path that a distribution finder
            should search.

            Typically refers to Python installed package paths such as
            "site-packages" directories and defaults to ``sys.path``.
            r)ror�r2rr%s r'rzDistributionFinder.Context.path�s ����:�:�>�>�&�#�(�3�3�3r))r.r/r0r1r$rqr2rr3r)r'r'rz�sT������		�		���	�
	&�	&�	&�
�	4�	4�
��	4�	4�	4r)r'c��dS)z�
        Find distributions.

        Return an iterable of all Distribution instances capable of
        loading the metadata for packages matching the ``context``,
        a DistributionFinder.Context instance.
        Nr3)r&r#s  r'r0z%DistributionFinder.find_distributionsrr)N)r.r/r0r1r'rvrwr0r3r)r'rr�st��������4�4�4�4�4�4�4�4�@	��)0�����������r)rc���eZdZdZej���fd���Zd�Zd�Zd�Z	d�Z
d�Zed���Z
ed	���Z�xZS)
�FastPathzs
    Micro-optimized class for searching a path for
    children.

    >>> FastPath('').children()
    ['...']
    c�F��t���|��Sr+)r��__new__)rA�rootr�s  �r'r�zFastPath.__new__s����w�w���s�#�#�#r)c��||_dSr+)r�)r&r�s  r'rqzFastPath.__init__s
����	�	�	r)c�6�tj|j|��Sr+)r+r,r�)r&�childs  r'�joinpathzFastPath.joinpaths���|�D�I�u�-�-�-r)c��tt��5tj|jpd��cddd��S#1swxYwYtt��5|���cddd��S#1swxYwYgS)Nrv)r�	Exception�os�listdirr��zip_childrenr%s r'�childrenzFastPath.childrens���
�i�
 �
 �	0�	0��:�d�i�.�3�/�/�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0�
�i�
 �
 �	'�	'��$�$�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'��	s!�=�A�A�A=�=B�Bc���tj|j��}|j���}|j|_t
�d�|D����S)Nc3�bK�|]*}|�tjd��dV��+dS)rrN)ry�	posixpathrk)r;r�s  r'r=z(FastPath.zip_children.<locals>.<genexpr>*s7����Q�Q�%�U�[�[����:�:�1�=�Q�Q�Q�Q�Q�Qr))�zipfiler,r��namelistr��dict�fromkeys)r&�zip_pathr�s   r'r�zFastPath.zip_children%sQ���<��	�*�*���
�&�&�(�(�� �)��
��}�}�Q�Q�5�Q�Q�Q�Q�Q�Qr)c�\�|�|j���|��Sr+)�lookup�mtime�searchr-s  r'r�zFastPath.search,s$���{�{�4�:�&�&�-�-�d�3�3�3r)c���tt��5tj|j��jcddd��S#1swxYwY|j���dSr+)r�OSErrorr��statr��st_mtimer��cache_clearr%s r'r�zFastPath.mtime/s���
�g�
�
�	/�	/��7�4�9�%�%�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�����!�!�!�!�!s�A�A�Ac� �t|��Sr+)�Lookup)r&r�s  r'r�zFastPath.lookup5s���d�|�|�r))r.r/r0r1rc�	lru_cacher�rqr�r�r�r�r2r�rr�r�r�s@r'rrs�����������Y����$�$�$�$���$����.�.�.����R�R�R�4�4�4��"�"��X�"�
����\�����r)rc� �eZdZdefd�Zd�ZdS)r�rc��tj�|j�����}|�d��}t
t��|_t
t��|_	|�
��D�]7}|���}|�d��r�|�d��d�d��d}t�|��}|j|�|�|������|r�|dkr�|�d��d�d��d}t�|��}|j	|�|�|������9|j���|j	���dS)Nz.egg�z
.dist-infoz	.egg-inforvr�-zegg-info)r�r�basenamer��lowerrMrrM�infos�eggsr��
rpartitionrr@rA�appendr��legacy_normalize�freeze)	r&r�base�base_is_eggr��lowr$�
normalized�legacy_normalizeds	         r'rqzLookup.__init__;s����w����	�*�*�0�0�2�2���m�m�F�+�+��)�$�/�/��
�(��.�.��	��]�]�_�_�
	J�
	J�E��+�+�-�-�C��|�|�7�8�8�
J��~�~�c�*�*�1�-�7�7��<�<�Q�?��%�/�/��5�5�
��
�:�&�-�-�d�m�m�E�.B�.B�C�C�C�C��
J��
�!2�!2����s�+�+�A�.�8�8��=�=�a�@��$,�$=�$=�d�$C�$C�!��	�+�,�3�3�D�M�M�%�4H�4H�I�I�I���
�������	�������r)c�T�|r|j|jn5tj�|j�����}|r|j|jn5tj�|j�����}tj||��Sr+)r�r�r�r�r�r�r�r�)r&�preparedr�r�s    r'r�z
Lookup.searchPs����
D�D�J�x�*�+�+���.�.�t�z�/@�/@�/B�/B�C�C�	��
C�D�I�h�0�1�1���.�.�t�y�/?�/?�/A�/A�B�B�	
�
��u�d�+�+�+r)N)r.r/r0rrqr�r3r)r'r�r�:s>�������X�����*,�,�,�,�,r)r�c�R�eZdZdZdZdZd�Zed���Zed���Z	d�Z
dS)r@zE
    A prepared search for metadata on a possibly-named package.
    Nc��||_|�dS|�|��|_|�|��|_dSr+)r$rAr�r�r�r-s  r'rqzPrepared.__init__fsB����	��<��F��.�.��.�.���!%�!6�!6�t�!<�!<����r)c�z�tjdd|������dd��S)zC
        PEP 503 normalization plus dashes as underscores.
        z[-_.]+r�r)r��subr��replacer#s r'rAzPrepared.normalizems4��
�v�i��d�+�+�1�1�3�3�;�;�C��E�E�Er)c�R�|����dd��S)z|
        Normalize the package name as found in the convention in
        older packaging tools versions and specs.
        r�r)r�r�r#s r'r�zPrepared.legacy_normalizets"���z�z�|�|�#�#�C��-�-�-r)c�*�t|j��Sr+)�boolr$r%s r'�__bool__zPrepared.__bool__|s���D�I���r))r.r/r0r1r�r�rqrXrAr�r�r3r)r'r@r@^s����������J���=�=�=��F�F��\�F��.�.��\�.�����r)r@c�x�eZdZee���fd���Zed���Zed���ZdS)�MetadataPathFinderc�l�|�|j|j��}tt|��S)a 
        Find distributions.

        Return an iterable of all Distribution instances capable of
        loading the metadata for packages matching ``context.name``
        (or all names if ``None`` indicated) along the paths in the list
        of directories ``context.path``.
        )�
_search_pathsr$rrHr*)rAr#�founds   r'r0z%MetadataPathFinder.find_distributions�s.���!�!�'�,���=�=���#�U�+�+�+r)c���t|���tj��fd�t	t
|��D����S)z1Find metadata directories in paths heuristically.c3�B�K�|]}|����V��dSr+)r�)r;rr�s  �r'r=z3MetadataPathFinder._search_paths.<locals>.<genexpr>�s@�����-
�-
�&*�D�K�K��!�!�-
�-
�-
�-
�-
�-
r))r@r�r�r�rHr)rAr$�pathsr�s   @r'r�z MetadataPathFinder._search_paths�sZ����D�>�>����,�,�-
�-
�-
�-
�.1�(�E�.B�.B�-
�-
�-
�
�
�	
r)c�B�tj���dSr+)rr�r�)rAs r'�invalidate_cachesz$MetadataPathFinder.invalidate_caches�s����$�$�&�&�&�&�&r)N)	r.r/r0rWrr'r0r�r�r3r)r'r�r��sw�������(:�(B�(B�(D�(D�
,�
,�
,��[�
,��
�
��[�
��'�'��[�'�'�'r)r�c�~��eZdZdefd�Zd�Zejje_d�Ze	�fd���Z
ed���Z�xZ
S)r*rc��||_dS)zfConstruct a distribution.

        :param path: SimplePath indicating the metadata directory.
        N)�_pathrs  r'rqzPathDistribution.__init__�s��
��
�
�
r)c���tttttt
��5|j�|���d���cddd��S#1swxYwYdS)Nr�r)	r�FileNotFoundError�IsADirectoryErrorr��NotADirectoryError�PermissionErrorr�r�rrs  r'rzPathDistribution.read_text�s���
������
�
�	M�	M��:�&�&�x�0�0�:�:�G�:�L�L�	M�	M�	M�	M�	M�	M�	M�	M�	M�	M�	M�	M����	M�	M�	M�	M�	M�	Ms�.A(�(A,�/A,c� �|jj|zSr+)r��parentrs  r'rzPathDistribution.locate_file�s���z� �4�'�'r)c���tj�t|j����}ttj��|�|����pt��j
S)zz
        Performance optimization: where possible, resolve the
        normalized name from the file system path.
        )r�rr�rIr�r	r@rA�_name_from_stemr�rB)r&�stemr�s  �r'rBz!PathDistribution._normalized_name�s\����w����D�J���0�0��)�I�h�(�)�)�$�*>�*>�t�*D�*D�E�E�
(��w�w�'�	
r)c��tj�|��\}}|dvrdS|�d��\}}}|S)a7
        >>> PathDistribution._name_from_stem('foo-3.0.egg-info')
        'foo'
        >>> PathDistribution._name_from_stem('CherryPy-3.0.dist-info')
        'CherryPy'
        >>> PathDistribution._name_from_stem('face.egg-info')
        'face'
        >>> PathDistribution._name_from_stem('foo.bar')
        r�Nr�)r�r�splitextr)r�r�extr$rk�rests      r'r�z PathDistribution._name_from_stem�sL����(�(��.�.�
��#��1�1�1��F�"�,�,�S�1�1���c�4��r))r.r/r0r
rqrrr1rr2rBrXr�r�r�s@r'r*r*�s���������Z�����M�M�M�%�.�6�I��(�(�(��	
�	
�	
�	
��X�	
�����\�����r)r*c�6�t�|��S)z�Get the ``Distribution`` instance for the named package.

    :param distribution_name: The name of the distribution package as a string.
    :return: A ``Distribution`` instance (or subclass thereof).
    )rr!��distribution_names r'rr�s���!�!�"3�4�4�4r)c�$�tjdi|��S)z|Get all ``Distribution`` instances in the current environment.

    :return: An iterable of ``Distribution`` instances.
    r3)rr )r�s r'rr�s��
� �*�*�6�*�*�*r)r5c�@�t�|��jS)z�Get the metadata for the named package.

    :param distribution_name: The name of the distribution package to query.
    :return: A PackageMetadata containing the parsed metadata.
    )rr!rr�s r'rr�s���!�!�"3�4�4�=�=r)c�*�t|��jS)z�Get the version string for the named package.

    :param distribution_name: The name of the distribution package to query.
    :return: The version string for the package as defined in the package's
        "Version" metadata key.
    )rr r�s r'r r �s���)�*�*�2�2r)rBr�c���tj�d�tt	����D����}t�|��jdi|��S)a�Return EntryPoint objects for all installed packages.

    Pass selection parameters (group or name) to filter the
    result to entry points matching those properties (see
    EntryPoints.select()).

    For compatibility, returns ``SelectableGroups`` object unless
    selection parameters are supplied. In the future, this function
    will return ``EntryPoints`` instead of ``SelectableGroups``
    even when no selection parameters are supplied.

    For maximum future compatibility, pass selection parameters
    or invoke ``.select`` with parameters on the result.

    :return: EntryPoints or SelectableGroups for all installed packages.
    c3�$K�|]}|jV��dSr+)r)r;rks  r'r=zentry_points.<locals>.<genexpr>s6����(�(�"���(�(�(�(�(�(r)r3)r�r�r��_uniquerr�r}r�)r�r�s  r'rr�sj��"�/�
'�
'�(�(�&-�m�o�o�&>�&>�(�(�(���C�� � ��%�%�,�6�6�v�6�6�6r)c�*�t|��jS)z�Return a list of files for the named package.

    :param distribution_name: The name of the distribution package to query.
    :return: List of files composing the distribution.
    )rrr�s r'rrs���)�*�*�0�0r)c�*�t|��jS)z�
    Return a list of requirements for the named package.

    :return: An iterator of requirements, suitable for
        packaging.requirement.Requirement.
    )rrr�s r'rrs���)�*�*�3�3r)c��tjt��}t��D]I}t	|��pt|��D](}||�|jd���)�Jt|��S)z�
    Return a mapping of top-level packages to their
    distributions.

    >>> import collections.abc
    >>> pkgs = packages_distributions()
    >>> all(isinstance(dist, collections.abc.Sequence) for dist in pkgs.values())
    True
    r=)	�collections�defaultdictrMr�_top_level_declared�_top_level_inferredr�rr�)�pkg_to_distrk�pkgs   r'rr's����)�$�/�/�K����;�;��&�t�,�,�I�0C�D�0I�0I�	;�	;�C����#�#�D�M�&�$9�:�:�:�:�	;�����r)c�T�|�d��pd���S)Nz
top_level.txtru)rryr�s r'r�r�8s%���N�N�?�+�+�1�r�8�8�:�:�:r)c�>�d�t|j��D��S)Nc��h|]L}|jdk�
t|j��dkr
|jdn|�d��j��MS)z.pyrrru)�suffix�len�parts�with_suffixr$)r;�fs  r'r�z&_top_level_inferred.<locals>.<setcomp>=sZ�����
��8�u����!�'�l�l�Q�&�&����
�
�A�M�M�"�,=�,=�,B���r))r
rr�s r'r�r�<s-���� ���,�,����r))Mr�r�rvrNr2r9r+r�r�rSrercr�r�r�rurr�_collectionsrr�
_functoolsrr	�
_itertoolsr
rrr
�
contextlibr�	importlibr�
importlib.abcrr�typingrrrr�__all__�ModuleNotFoundErrorrr5rZrirMr�r�r�r�r��
PurePosixPathr�r
rrrr�r@r�r*rrrr rdr�r�rrrrIrr�r�r3r)r'�<module>r�s���	�	�	�	�	�	�	�	�
�
�
�
�
�
�
�
�
�
�
�
�������������������������������������������������4�4�4�4�4�4�4�4�/�/�/�/�/�/�/�/�8�8�8�8�8�8�8�8�.�.�.�.�.�.�.�.�������#�#�#�#�#�#�(�(�(�(�(�(�������1�1�1�1�1�1�1�1�1�1�1�1�
�
�
�� 	�	�	�	�	�.�	�	�	�>1�>1�>1�>1�>1�>1�>1�>1�B!�!�!�!�!�!�!�!�4A!�A!�A!�A!�A!��A!�A!�A!�HC)�C)�C)�C)�C)�T�C)�C)�C)�L:
�:
�:
�:
�:
�.�:
�:
�:
�z4 �4 �4 �4 �4 �4 �4 �4 �n%*�%*�%*�%*�%*�z�4�%*�%*�%*�P
+�
+�
+�
+�
+�'�'�
+�
+�
+� C�C�C�C�C�C�C�C�EF�EF�EF�EF�EF�EF�EF�EF�P-�-�-�-�-��-�-�-�`,�,�,�,�,�,�,�,�^!,�!,�!,�!,�!,�!,�!,�!,�H��������D'�'�'�'�'�+�'�'�'�62�2�2�2�2�|�2�2�2�j5�5�5�+�+�+�>�5�#8�>�>�>�>�3�3�3��)�
�����.�/�/������
7�e�K�1A�$A�B�7�7�7�7�.1�1�1�4�4�4����T�#�Y�� 7�����";�;�;�����r)

Hacked By AnonymousFox1.0, Coded By AnonymousFox