%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/setuptools/_vendor/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/setuptools/_vendor/__pycache__/zipp.cpython-312.pyc

�


_�d� ���ddlZddlZddlZddlZddlZddlZddlZejdkrddlm	Z	ne
Z	dgZd�Zd�Z
e	jZ	d�ZGd�d	ej"�ZGd
�de�Zd�ZGd
�d�Zy)�N)��)�OrderedDict�Pathc�B�tjt|�dd�S)a2
    Given a path with elements separated by
    posixpath.sep, generate all parents of that path.

    >>> list(_parents('b/d'))
    ['b']
    >>> list(_parents('/b/d/'))
    ['/b']
    >>> list(_parents('b/d/f/'))
    ['b/d', 'b']
    >>> list(_parents('b'))
    []
    >>> list(_parents(''))
    []
    �N)�	itertools�islice�	_ancestry��paths �9/usr/lib/python3/dist-packages/setuptools/_vendor/zipp.py�_parentsrs�� ���I�d�O�Q��5�5�c#��K�|jtj�}|rH|tjk7r4|��tj|�\}}|r|tjk7r�2yyyy�w)aR
    Given a path with elements separated by
    posixpath.sep, generate all elements of that path

    >>> list(_ancestry('b/d'))
    ['b/d', 'b']
    >>> list(_ancestry('/b/d/'))
    ['/b/d', '/b']
    >>> list(_ancestry('b/d/f/'))
    ['b/d/f', 'b/d', 'b']
    >>> list(_ancestry('b'))
    ['b']
    >>> list(_ancestry(''))
    []
    N)�rstrip�	posixpath�sep�split)r
�tails  rrr%sV���� �;�;�y�}�}�%�D�
�4�9�=�=�(��
��_�_�T�*�
��d��4�9�=�=�(�$�(�$�s�A&A-�)A-c�T�tjt|�j|�S)zZ
    Return items in minuend not in subtrahend, retaining order
    with O(1) lookup.
    )r	�filterfalse�set�__contains__)�minuend�
subtrahends  r�_differencer?s!��
� � ��Z��!=�!=�w�G�Grc�N��eZdZdZed��Z�fd�Zd�Zd�Ze	d��Z
�xZS)�CompleteDirszk
    A ZipFile subclass that ensures that implied directories
    are always included in the namelist.
    c��tjjtt|��}d�|D�}tt
||��S)Nc3�BK�|]}|tjz���y�w�N)rr)�.0�ps  r�	<genexpr>z-CompleteDirs._implied_dirs.<locals>.<genexpr>Ps����6��1�y�}�}�$�6�s�)r	�chain�
from_iterable�mapr�_deduper)�names�parents�as_dirss   r�
_implied_dirszCompleteDirs._implied_dirsMs9���/�/�/�/��H�e�0D�E��6�g�6���{�7�E�2�3�3rc�b��tt|��}|t|j	|��zSr")�superr�namelist�listr-)�selfr*�	__class__s  �rr0zCompleteDirs.namelistSs-����l�D�2�4���t�D�.�.�u�5�6�6�6rc�4�t|j��Sr")rr0�r2s r�	_name_setzCompleteDirs._name_setWs���4�=�=�?�#�#rc�L�|j�}|dz}||vxr||v}|r|S|S)zx
        If the name represents a directory, return that name
        as a directory (with the trailing slash).
        �/)r6)r2�namer*�dirname�	dir_matchs     r�resolve_dirzCompleteDirs.resolve_dirZs:��
��� ����*����%�:�'�U�*:�	�#�w�-��-rc��t|t�r|St|tj�s|t	|��Sd|j
vrt}||_|S)zl
        Given a source (filename or zipfile), return an
        appropriate CompleteDirs subclass.
        �r)�
isinstancer�zipfile�ZipFile�_pathlib_compat�moder3)�cls�sources  r�makezCompleteDirs.makedsQ���f�l�+��M��&�'�/�/�2���v�.�/�/��f�k�k�!��C�����
r)�__name__�
__module__�__qualname__�__doc__�staticmethodr-r0r6r<�classmethodrF�
__classcell__�r3s@rrrGs?����
�4��4�
7�$�.����rrc�,��eZdZdZ�fd�Z�fd�Z�xZS)�
FastLookupzV
    ZipFile subclass to ensure implicit
    dirs exist and are resolved rapidly.
    c���tjt�5|jcddd�S#1swYnxYwtt
|��|_|jSr")�
contextlib�suppress�AttributeError�_FastLookup__namesr/rPr0�r2r3s �rr0zFastLookup.namelist~sH���
�
 �
 ��
0�	 ��<�<�	 �	 �	 ���Z��7�9����|�|���1�:c���tjt�5|jcddd�S#1swYnxYwtt
|��|_|jSr")rRrSrT�_FastLookup__lookupr/rPr6rVs �rr6zFastLookup._name_set�sH���
�
 �
 ��
0�	!��=�=�	!�	!�	!���j�$�9�;��
��}�}�rW)rGrHrIrJr0r6rMrNs@rrPrPxs����
��rrPc�X�	|j�S#t$rt|�cYSwxYw)zi
    For path-like objects, convert to a filename for compatibility
    on Python 3.6.1 and earlier.
    )�
__fspath__rT�strrs rrBrB�s-��
���� � �����4�y���s��)�)c���eZdZdZdZdd�Zddd�d�Zed��Zed��Z	ed	��Z
ed
��Zed��Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZeZed��Zy)ru4
    A pathlib-compatible interface for zip files.

    Consider a zip file with this structure::

        .
        ├── a.txt
        └── b
            ├── c.txt
            └── d
                └── e.txt

    >>> data = io.BytesIO()
    >>> zf = zipfile.ZipFile(data, 'w')
    >>> zf.writestr('a.txt', 'content of a')
    >>> zf.writestr('b/c.txt', 'content of c')
    >>> zf.writestr('b/d/e.txt', 'content of e')
    >>> zf.filename = 'mem/abcde.zip'

    Path accepts the zipfile object itself or a filename

    >>> root = Path(zf)

    From there, several path operations are available.

    Directory iteration (including the zip file itself):

    >>> a, b = root.iterdir()
    >>> a
    Path('mem/abcde.zip', 'a.txt')
    >>> b
    Path('mem/abcde.zip', 'b/')

    name property:

    >>> b.name
    'b'

    join with divide operator:

    >>> c = b / 'c.txt'
    >>> c
    Path('mem/abcde.zip', 'b/c.txt')
    >>> c.name
    'c.txt'

    Read text:

    >>> c.read_text()
    'content of c'

    existence:

    >>> c.exists()
    True
    >>> (b / 'missing.txt').exists()
    False

    Coercion to string:

    >>> import os
    >>> str(c).replace(os.sep, posixpath.sep)
    'mem/abcde.zip/b/c.txt'

    At the root, ``name``, ``filename``, and ``parent``
    resolve to the zipfile. Note these attributes are not
    valid and will raise a ``ValueError`` if the zipfile
    has no filename.

    >>> root.name
    'abcde.zip'
    >>> str(root.filename).replace(os.sep, posixpath.sep)
    'mem/abcde.zip'
    >>> str(root.parent)
    'mem'
    z>{self.__class__.__name__}({self.root.filename!r}, {self.at!r})c�F�tj|�|_||_y)aX
        Construct a Path from a ZipFile or filename.

        Note: When the source is an existing ZipFile object,
        its type (__class__) will be mutated to a
        specialized type. If the caller wishes to retain the
        original type, the caller should either create a
        separate ZipFile object or pass a filename.
        N)rPrF�root�at)r2r_r`s   r�__init__z
Path.__init__�s���O�O�D�)��	���rN��pwdc�.�|j�rt|��|d}|j�s|dk(rt|��|jj|j||��}d|vr|s|rtd��|Stj|g|��i|��S)z�
        Open this entry as text or binary following the semantics
        of ``pathlib.Path.open()`` by passing arguments through
        to io.TextIOWrapper().
        rr>rb�bz*encoding args invalid for binary operation)
�is_dir�IsADirectoryError�exists�FileNotFoundErrorr_�openr`�
ValueError�io�
TextIOWrapper)r2rCrc�args�kwargs�zip_mode�streams       rrjz	Path.open�s����;�;�=�#�D�)�)���7���{�{�}��S��#�D�)�)����������s��;���$�;��v� �!M�N�N��M�����8��8��8�8rc��tj|j�jxs|jjSr")�pathlibrr`r9�filenamer5s rr9z	Path.name�*���|�|�D�G�G�$�)�)�?�T�]�]�-?�-?�?rc��tj|j�jxs|jjSr")rsrr`�suffixrtr5s rrwzPath.suffix	s*���|�|�D�G�G�$�+�+�C�t�}�}�/C�/C�Crc��tj|j�jxs|jjSr")rsrr`�suffixesrtr5s rryz
Path.suffixes
s*���|�|�D�G�G�$�-�-�G����1G�1G�Grc��tj|j�jxs|jjSr")rsrr`�stemrtr5s rr{z	Path.stemrurc��tj|jj�j	|j
�Sr")rsrr_rt�joinpathr`r5s rrtz
Path.filenames*���|�|�D�I�I�.�.�/�8�8����A�Arc�z�|jdg|��i|��5}|j�cddd�S#1swYyxYw)Nr>�rj�read)r2rnro�strms    r�	read_textzPath.read_texts:��
�T�Y�Y�s�
,�T�
,�V�
,�	���9�9�;�	�	�	�s�1�:c�p�|jd�5}|j�cddd�S#1swYyxYw)N�rbr)r2r�s  r�
read_byteszPath.read_bytess-��
�Y�Y�t�_�	���9�9�;�	�	�	�s�,�5c��tj|jjd��|jjd�k(S�Nr8)rr:r`r)r2r
s  r�	_is_childzPath._is_child!s2��� � �������!4�5�������9L�L�Lrc�:�|j|j|�Sr")r3r_)r2r`s  r�_nextz
Path._next$s���~�~�d�i�i��,�,rc�V�|jxs|jjd�Sr�)r`�endswithr5s rrfzPath.is_dir's"���7�7�{�3�d�g�g�.�.�s�3�3rc�H�|j�xr|j�Sr")rhrfr5s r�is_filezPath.is_file*s���{�{�}�2�T�[�[�]�!2�2rc�N�|j|jj�vSr")r`r_r6r5s rrhzPath.exists-s���w�w�$�)�)�-�-�/�/�/rc��|j�std��t|j|jj��}t
|j|�S)NzCan't listdir a file)rfrkr(r�r_r0�filterr�)r2�subss  r�iterdirzPath.iterdir0sE���{�{�}��3�4�4��4�:�:�t�y�y�1�1�3�4���d�n�n�d�+�+rc�j�tj|jj|j�Sr")r�joinr_rtr`r5s r�__str__zPath.__str__6s!���~�~�d�i�i�0�0�$�'�'�:�:rc�:�|jj|��S)Nr5)�_Path__repr�formatr5s r�__repr__z
Path.__repr__9s���{�{�!�!�t�!�,�,rc��tj|jgtt|����}|j|jj|��Sr")rr�r`r(rBr�r_r<)r2�other�nexts   rr}z
Path.joinpath<s>���~�~�d�g�g�D��O�U�(C�D���z�z�$�)�)�/�/��5�6�6rc���|js|jjStj|jjd��}|r|dz
}|j
|�Sr�)r`rt�parentrr:rr�)r2�	parent_ats  rr�zPath.parentBsR���w�w��=�=�'�'�'��%�%�d�g�g�n�n�S�&9�:�	�����I��z�z�)�$�$r)�)r>)rGrHrIrJr�rarj�propertyr9rwryr{rtr�r�r�r�rfr�rhr�r�r�r}�__truediv__r��rrrr�s���K�ZN�F��9��9�$�@��@��D��D��H��H��@��@��B��B���M�-�4�3�0�,�;�-�7��K�
�%��%r)rlrr@r	rR�sysrs�version_info�collectionsr�dict�__all__rr�fromkeysr)rrArrPrBrr�rr�<module>r�s���	�����
�����f��'��K��(��6�&+�,�
�
��/�H�.�7�?�?�.�b���&�s%�s%r

Zerion Mini Shell 1.0