AlkantarClanX12

Your IP : 3.136.23.132


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/distlib/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/distlib/__pycache__/util.cpython-311.pyc

�

�܋f����ddlZddlmZddlZddlZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZ	ddlZn
#e$rdZYnwxYwddlZddlZddlZddlZddlZ	ddlZn#e$rddlZYnwxYwddlZddlmZddlmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/e
j0e1��Z2e
j3d��Z4e
j3d��Z5e
j3d	��Z6e
j3d
��Z7e
j3d��Z8e
j3d��Z9e
j3d
��Z:e
j3d��Z;d�Z<d�Z=d�Z>d�Z?d�Z@dkd�ZAd�ZBd�ZCd�ZDejEd���ZFejEd���ZGejEdld���ZHGd�deI��ZJd�ZKGd�d eI��ZLd!�ZMGd"�d#eI��ZNe
j3d$e
jO��ZPd%�ZQdmd&�ZRd'�ZSd(�ZTd)�ZUd*�ZVd+�ZWe
j3d,e
jX��ZYe
j3d-��ZZdmd.�Z[e
j3d/��Z\d0�Z]d1�Z^d2�Z_d3Z`d4�Zad5�ZbGd6�d7eI��ZcGd8�d9eI��ZdGd:�d;eI��Zed<Zfdnd>�Zgd?�Zhd@ZiGdA�dBeI��Zje
j3dC��Zke
j3dD��Zle
j3dE��ZmdF�ZdG�Zner:ddHlmoZpmqZqmrZrGdI�dJe$js��ZsGdK�dLep��ZoGdM�dNeoe&��ZtGdO�dPe%ju��ZuerGdQ�dRe%jv��ZvGdS�dTe%jw��ZwdU�ZxGdV�dWeI��ZyGdX�dYey��ZzGdZ�d[ey��Z{Gd\�d]e'��Z|Gd^�d_eI��Z}d`�Z~Gda�dbeI��Zdc�Z�dd�Z�de�Z�dfdgdhdi�Z�dj�Z�dS)o�N)�deque)�iglob�)�DistlibException)�string_types�	text_type�shutil�	raw_input�StringIO�cache_from_source�urlopen�urljoin�httplib�	xmlrpclib�HTTPHandler�BaseConfigurator�valid_ident�	Container�configparser�URLError�ZipFile�fsdecode�unquote�urlparsez^([\w\.-]+)\s*z^([\w\.*+-]+)\s*z^(<=?|>=?|={2,3}|[~!]=)\s*z*^((<=?)|(>=?)|={2,3}|[~!]=|in|not\s+in)\s*z^or\b\s*z	^and\b\s*z(\S+)\s*z(([\s\w\.{}()*+#:;,/?!~`@$%^&=|<>\[\]-]+)c�F�����d����fd���fd���fd���|��S)ae
    Parse a marker string and return a dictionary containing a marker expression.

    The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in
    the expression grammar, or strings. A string contained in quotes is to be
    interpreted as a literal string, and a string not contained in quotes is a
    variable (such as os_name).
    c��t�|��}|r8|���d}||���d�}�ns|st	d���|d}|dvrt	d|z���d�|d��}|dd�}|g}|r�|d|krn�|d|kr |�|��|dd�}nwt�|��}|st	d|z���|�|���d��||���d�}|��d�|��}t	d|z���|�|��d�|��}|dd��	��}||fS)	Nrzunexpected end of inputz'"zinvalid expression: %s�rzerror in string literal: %szunterminated string: %s)
�
IDENTIFIER�match�groups�end�SyntaxError�replace�append�STRING_CHUNK�join�lstrip)�	remaining�m�result�q�oq�parts�ss       �]/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/distlib/util.py�
marker_varz parse_marker.<locals>.marker_varBs������Y�'�'���	/��X�X�Z�Z��]�F�!�!�%�%�'�'�(�(�+�I�I��	/��7�8�8�8��!��A���~�~�!�":�Y�"F�G�G�G����q�"�%�%�B�!�!�"�"�
�I��C�E��
A��Q�<�1�$�$���q�\�R�'�'��L�L��$�$�$� )�!�"�"�
�I�I�$�*�*�9�5�5�A��5�)�*G�*3�+4�5�5�5��L�L������A��/�/�/� )�!�%�%�'�'�(�(� 3�I��
A��G�G�E�N�N��!�";�a�"?�@�@�@��L�L��O�O�O��W�W�U�^�^�F�!�!�"�"�
�,�,�.�.�I��y� � �c����|ro|ddkrc�|dd������\}}|ddkrtd|z���|dd����}n{�|��\}}|rit�|��}|snL|���d}||���d�}�|��\}}|||d�}|�i|}||fS)Nr�(r�)�unterminated parenthesis: %s��op�lhs�rhs)r'r"�	MARKER_OPrr r!)r(r*r8r)r7r9�markerr0s      ��r/�marker_exprz!parse_marker.<locals>.marker_exprgs����	��1���,�,� &��y����}�';�';�'=�'=� >� >��F�I���|�s�"�"�!�"@�9�"L�M�M�M�!�!�"�"�
�,�,�.�.�I�I�'�Z�	�2�2�N�C���
9��O�O�I�.�.������X�X�Z�Z��]��%�a�e�e�g�g�h�h�/�	�!+��I�!6�!6���Y���C�8�8���
9��F��y� � r1c�����|��\}}|rOt�|��}|sn2||���d�}�|��\}}d||d�}|�O||fS)N�andr6)�ANDrr!)r(r8r)r9r<s    �r/�
marker_andz parse_marker.<locals>.marker_andzs����$��Y�/�/���Y��	8��	�	�)�$�$�A��
��!�!�%�%�'�'�(�(�+�I�(�[��3�3�N�C���s�3�7�7�C�
�	8��I�~�r1c�����|��\}}|rOt�|��}|sn2||���d�}�|��\}}d||d�}|�O||fS)N�orr6)�ORrr!)r(r8r)r9r@s    �r/r;zparse_marker.<locals>.marker�s����#��I�.�.���Y��	7�����#�#�A��
��!�!�%�%�'�'�(�(�+�I�'�Z�	�2�2�N�C���c�#�6�6�C�
�	7��I�~�r1�)�
marker_stringr;r@r<r0s @@@@r/�parse_markerrF8sx������#!�#!�#!�J!�!�!�!�!�!�&	�	�	�	�	�	�	�	�	�	��6�-� � � r1c���|���}|r|�d��rdSt�|��}|st	d|z���|���d}||���d�}dx}x}x}}|�r"|ddk�r|�dd��}|dkrt	d|z���|d|�}	||dzd����}g}|	r�t�|	��}|st	d	|	z���|�	|���d��|	|���d�}	|	sn<|	dd
krt	d|	z���|	dd����}	|	��|sd}|�r�|ddkr�|dd����}t�|��}|st	d
|z���|���d}t|��}
|
jr|
j
st	d|z���||���d����}�n.d�}|ddkr||��\}}�n|�dd��}|dkrt	d|z���|d|�}	||dzd����}t�|	��r||	��\}}n�t�|	��}|st	d|	z���|���d}
|	|���d����}	|	rt	d|	z���d|
fg}|rL|ddkrt	d|z���|dd����}t!|��\}}|r|ddkrt	d|z���|s|}n$|�dd�d�|D������}t%||||||���S)z�
    Parse a requirement passed in as a string. Return a Container
    whose attributes contain the various parts of the requirement.
    �#Nzname expected: %sr�[�]rzunterminated extra: %szmalformed extra: %s�,zcomma expected in extras: %s�@zinvalid URI: %szInvalid URL: %sc�t�t�|��}d}|�rg}	|���d}||���d�}t�|��}|std|z���|���d}|�||f��||���d�}|r|ddkrnO|dd����}|sn0t�|��}|std|z�����|sd}||fS)z|
                Return a list of operator, version tuples if any are
                specified, else None.
                NTrzinvalid version: %srKr�invalid constraint: %s)�
COMPARE_OPrr r!�VERSION_IDENTIFIERr"r$r')�
ver_remainingr)�versionsr7�vs     r/�get_versionsz'parse_requirement.<locals>.get_versions�sb��
�$�$�]�3�3�����(�!�H�=��X�X�Z�Z��]��(5�a�e�e�g�g�h�h�(?�
�.�4�4�]�C�C�� �=�"-�.C�.;�/<�#=�#=�=��H�H�J�J�q�M�� ����Q��0�0�0�(5�a�e�e�g�g�h�h�(?�
�,�"�
�a�0@�C�0G�0G�!�(5�a�b�b�(9�(@�(@�(B�(B�
� -�"�!�&�,�,�]�;�;�� �=�"-�.F�.;�/<�#=�#=�=�'=�*$�(�#'����.�.r1r3r4r5rNz~=�;zinvalid requirement: %szunexpected trailing data: %s� �, c��g|]}d|z��S)z%s %srD)�.0�cons  r/�
<listcomp>z%parse_requirement.<locals>.<listcomp>s��/�/�/�s�W�s�]�/�/�/r1)�name�extras�constraintsr;�url�requirement)�strip�
startswithrrr"r r!�findr'r$�	NON_SPACEr�scheme�netlocrOrPrFr&r)�reqr(r)�distnamer]�	mark_exprrR�uri�ir.�trT�_rS�rss               r/�parse_requirementro�s���
�	�	���I���	�,�,�S�1�1���t�����#�#�A��;��-�	�9�:�:�:��x�x�z�z�!�}�H��!�%�%�'�'�(�(�#�I�*.�.�F�.�Y�.��C���Y�q�\�S�(�(��N�N�3��"�"���q�5�5��6��B�C�C�C��a��c�N���a�!�e�f�f�%�,�,�.�.�	����
	�� � ��#�#�A��
=�!�"7�!�";�<�<�<��M�M�!�(�(�*�*�Q�-�(�(�(��!�%�%�'�'�(�(��A��
����t�s�{�{�!�"@�1�"D�E�E�E��!�"�"������A��
	��	��F��J+��Q�<�3���!�!�"�"�
�,�,�.�.�I����	�*�*�A��
A�!�"3�i�"?�@�@�@��(�(�*�*�Q�-�C���
�
�A�
�H�
;���
;�!�"3�c�"9�:�:�:�!�!�%�%�'�'�(�(�+�2�2�4�4�I�I� 
/� 
/� 
/�D��|�s�"�"�&2�l�9�&=�&=�#��)�)��N�N�3��*�*���q�5�5�%�&D�&/�'0�1�1�1��a��c�N��%�a�!�e�f�f�-�4�4�6�6�	��#�#�A�&�&�
+�".�,�q�/�/�K�H�a�a�*�0�0��3�3�A��H�)�*B�Q�*F�G�G�G����
�
�1�
�A��!�%�%�'�'�(�(��*�*�,�,�A��H�)�*B�Q�*F�G�G�G�!%�q�	�{�H��7��Q�<�3����7�)�C�D�D�D��a�b�b�M�(�(�*�*�	�+�I�6�6��	�9��F�Y�q�\�S�(�(��8�9�D�E�E�E��2�
��� ���$�)�)�/�/�h�/�/�/�#1�#1�#1�2���(�"�!)�%��!#�%�%�%�%r1c���d�}i}|D]�\}}}tj�||��}t|��D]�}tj�||��}	t|	��D]v}
|||
��}|�|�|d���'|||
��}|�tjjd���d��}
|
dz|z||<�w����|S)z%Find destinations for resources filesc��|�tjjd��}|�tjjd��}|�|��sJ�|t|��d��d��S�N�/)r#�os�path�seprb�lenr')�rootrus  r/�get_rel_pathz)get_resources_dests.<locals>.get_rel_pathsk���|�|�B�G�K��-�-���|�|�B�G�K��-�-�����t�$�$�$�$�$��C��I�I�J�J��&�&�s�+�+�+r1Nrs)rtrur&r�popr#rv�rstrip)�resources_root�rulesry�destinations�base�suffix�dest�prefix�abs_base�abs_glob�abs_path�
resource_file�rel_path�rel_dests              r/�get_resources_destsr�s��,�,�,��L�#�L�L���f�d�����n�d�3�3���f�
�
�		L�		L�H��w�|�|�H�f�5�5�H�!�(�O�O�
L�
L�� ,��^�X� F� F�
��<� �$�$�]�D�9�9�9�9�+�|�H�h�?�?�H�#�|�|�B�G�K��=�=�D�D�S�I�I�H�2:�S�.�8�2K�L��/�/�
L�		L��r1c��ttd��rd}n.tjttdtj��k}|S)N�real_prefixT�base_prefix)�hasattr�sysr��getattr�r*s r/�in_venvr�2s=���s�M�"�"�G������w�s�M�3�:�F�F�F���Mr1c�f�tj}t|t��st	|��}|S�N)r��
executable�
isinstancerrr�s r/�get_executabler�<s/���^�F��f�i�(�(�"��&�!�!���Mr1c��|}	t|��}|}|s|r|}|r)|d���}||vrn|rd|||fz}�C|S)NTrz	%c: %s
%s)r
�lower)�prompt�
allowed_chars�error_prompt�default�pr.�cs       r/�proceedr�Ns|���A�
=��a�L�L�����	�W�	��A��	=��!��
�
���A��M�!�!���
=� �A�|�V�#<�<��
=�
�Hr1c��t|t��r|���}i}|D]}||vr||||<�|Sr�)r�r�split)�d�keysr*�keys    r/�extract_by_keyr�^sQ���$��%�%���z�z�|�|��
�F��!�!���!�8�8��C�&�F�3�K���Mr1c��tjddkrtjd��|��}|���}t|��}	t
j|��}|ddd}|���D]>\}}|���D]$\}}|�d|��}t|��}	|	�J�|	||<�%�?|S#t$r|�dd��YnwxYwd�}
tj
��}	|
||��nX#tj$rF|���t!j|��}t|��}|
||��YnwxYwi}|���D]C}ix||<}|�|��D]$\}
}|
�d|��}t|��}	|	�J�|	||
<�%�D|S)	Nr��utf-8�
extensionszpython.exports�exports� = c�~�t|d��r|�|��dS|�|��dS)N�	read_file)r�r��readfp)�cp�streams  r/�read_streamz!read_exports.<locals>.read_stream|sD���2�{�#�#�	��L�L�� � � � � ��I�I�f�����r1)r��version_info�codecs�	getreader�readr�json�load�items�get_export_entry�	Exception�seekr�ConfigParser�MissingSectionHeaderError�close�textwrap�dedent�sections)r��data�jdatar*�group�entries�krSr.�entryr�r�r�r\�values               r/�read_exportsr�hs:��
����a���*��!�'�*�*�6�2�2���;�;�=�=�D�
�d�^�^�F���	�&�!�!���|�$�%5�6�y�A��$�l�l�n�n�	#�	#�N�E�7��
�
���
#�
#���1�!"���A�A�&��(��+�+���(�(�(�"���
�
�	
#�
�
���������A�q�������������
�	"�	$�	$�B� ���B��������1� � � ���������t�$�$���$������B�������	 �����F��{�{�}�}�"�"�� "�"��s��g��8�8�C�=�=�	"�	"�K�D�%�!�T�T�5�5�)�A�$�Q�'�'�E��$�$�$�!�G�D�M�M�	"��Ms&�A<C� C8�7C8�D�AE4�3E4c��tjddkrtjd��|��}t	j��}|���D]�\}}|�|��|���D]e}|j	�|j
}n|j
�d|j	��}|jr |�dd�|j���d�}|�
||j|���f��|�|��dS)Nrr�r��:z [rWrJ)r�r�r��	getwriterrr�r��add_section�valuesr�r��flagsr&�setr\�write)r�r�r�r�rSr�r.s       r/�
write_exportsr��s��
����a���*��!�'�*�*�6�2�2��	�	"�	$�	$�B��
�
���
%�
%���1�
���q�����X�X�Z�Z�	%�	%�E��|�#��L���$�|�|�|�U�\�\�:���{�
<�!"���D�I�I�e�k�$:�$:�$:�$:�;���F�F�1�e�j�!�$�$�$�$�	%��H�H�V�����r1c#�K�tj��}	|V�tj|��dS#tj|��wxYwr�)�tempfile�mkdtempr	�rmtree)�tds r/�tempdirr��sN����	�	�	�	�B�������
�b��������
�b�������s	�1�Ac#�K�tj��}	tj|��dV�tj|��dS#tj|��wxYwr�)rt�getcwd�chdir)r��cwds  r/r�r��sO����
�)�+�+�C��
������
����
���
�
�
�
�
�����
�
�
�
�����A�A�c#�K�tj��}	tj|��dV�tj|��dS#tj|��wxYwr�)�socket�getdefaulttimeout�setdefaulttimeout)�seconds�ctos  r/�socket_timeoutr��sa����
�
"�
$�
$�C�&�� ��)�)�)�
����� ��%�%�%�%�%��� ��%�%�%�%���r�c��eZdZd�Zdd�ZdS)�cached_propertyc��||_dSr�)�func)�selfr�s  r/�__init__zcached_property.__init__�s
����	�	�	r1Nc��|�|S|�|��}t�||jj|��|Sr�)r��object�__setattr__�__name__)r��obj�clsr�s    r/�__get__zcached_property.__get__�s=���;��K��	�	�#�������3��	� 2�E�:�:�:��r1r�)r��
__module__�__qualname__r�r�rDr1r/r�r��s7���������
�����r1r�c��tjdkr|S|s|S|ddkrtd|z���|ddkrtd|z���|�d��}tj|vr-|�tj��tj|v�-|stjStjj|�S)a�Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    rsrzpath '%s' cannot be absolute���zpath '%s' cannot end with '/')rtrv�
ValueErrorr��curdir�removerur&)�pathname�pathss  r/�convert_pathr��s���
�v��}�}���������{�c����7�(�B�C�C�C���|�s����8�8�C�D�D�D��N�N�3���E�
�)�u�
�
�
���R�Y����
�)�u�
�
����y��
�7�<���r1c�~�eZdZdd�Zd�Zd�Zd�Zdd�Zdd	�Zd
�Z	d�Z
d�Zd
�Zd�Z
				dd�Zd�Zd�Zd�Zd�ZdS)�FileOperatorFc�b�||_t��|_|���dSr�)�dry_runr��ensured�_init_record)r�rs  r/r�zFileOperator.__init__�s,������u�u����������r1c�`�d|_t��|_t��|_dS�NF)�recordr��
files_written�dirs_created�r�s r/rzFileOperator._init_record�s'����� �U�U����E�E����r1c�L�|jr|j�|��dSdSr�)rr�add)r�rus  r/�record_as_writtenzFileOperator.record_as_written�s3���;�	)���"�"�4�(�(�(�(�(�	)�	)r1c�H�tj�|��s/tdtj�|��z���tj�|��sdStj|��jtj|��jkS)a�Tell if the target is newer than the source.

        Returns true if 'source' exists and is more recently modified than
        'target', or if 'source' exists and 'target' doesn't.

        Returns false if both exist and 'target' is the same age or younger
        than 'source'. Raise PackagingFileError if 'source' does not exist.

        Note that this test is not very accurate: files created in the same
        second will have the same "age".
        zfile '%r' does not existT)rtru�existsr�abspath�stat�st_mtime)r��source�targets   r/�newerzFileOperator.newers����w�~�~�f�%�%�	<�"�#=�#%�7�?�?�6�#:�#:�$;�<�<�
<��w�~�~�f�%�%�	��4��w�v���'�"�'�&�/�/�*B�B�Br1Tc��|�tj�|����t�d||��|js�d}|rhtj�|��rd|z}nCtj�|��r$tj�	|��sd|z}|rt|dz���tj||��|�
|��dS)z8Copy a file respecting dry-run and force flags.
        zCopying %s to %sNz%s is a symlinkz%s is a non-regular filez which would be overwritten)�
ensure_dirrtru�dirname�logger�infor�islinkr
�isfiler�r	�copyfiler)r��infile�outfile�check�msgs     r/�	copy_filezFileOperator.copy_files���	
��������0�0�1�1�1����&���8�8�8��|�		-��C��
?��7�>�>�'�*�*�?�+�g�5�C�C��W�^�^�G�,�,�?�R�W�^�^�G�5L�5L�?�4�w�>�C��
F� ��'D�!D�E�E�E��O�F�G�,�,�,����w�'�'�'�'�'r1Nc��tj�|��rJ�|�tj�|����t
�d||��|jsn|�t|d��}ntj|d|���}	tj||��|���n#|���wxYw|�
|��dS)NzCopying stream %s to %s�wb�w��encoding)rtru�isdirrrrrr�openr�r	�copyfileobjr�r)r��instreamrr%�	outstreams     r/�copy_streamzFileOperator.copy_stream's����7�=�=��)�)�)�)�)���������0�0�1�1�1����-�x��A�A�A��|�	"��� ��$�/�/�	�	�"�K���x�H�H�H�	�
"��"�8�Y�7�7�7����!�!�!�!��	���!�!�!�!�������w�'�'�'�'�'s�"C�C"c��|�tj�|����|jsptj�|��rtj|��t|d��5}|�|��ddd��n#1swxYwY|�	|��dS)Nr")
rrtrurrr
r�r'r�r)r�rur��fs    r/�write_binary_filezFileOperator.write_binary_file6s�����������-�-�.�.�.��|�	��w�~�~�d�#�#�
 ��	�$�����d�D�!�!�
�Q�����
�
�
�
�
�
�
�
�
�
�
�
�
�
����
�
�
�
����t�$�$�$�$�$s�=B�B#�&B#c�X�|�||�|����dSr�)r.�encode)r�rur�r%s    r/�write_text_filezFileOperator.write_text_file?s*�����t�T�[�[��%:�%:�;�;�;�;�;r1c�^�tjdks tjdkr�tjdkrz|D]y}|jrt�d|���%tj|��j|z|z}t�d||��tj||���vdSdSdS)N�posix�javazchanging mode of %szchanging mode of %s to %o)	rtr\�_namerrrr�st_mode�chmod)r��bits�mask�filesr-�modes      r/�set_modezFileOperator.set_modeBs���
�7�g���"�'�V�"3�"3���G�8K�8K��
&�
&���<�&��K�K� 5�q�9�9�9�9��G�A�J�J�.��5��=�D��K�K� ;�Q��E�E�E��H�Q��%�%�%�%�#4�"3�8K�8K�
&�
&r1c�0�|�dd|��S)Nimi�)r<)r.r-s  r/�<lambda>zFileOperator.<lambda>Ns��q�z�z�%���'C�'C�r1c���tj�|��}||jvr�tj�|��s�|j�|��tj�|��\}}|�|��t�	d|z��|j
stj|��|jr |j
�|��dSdSdSdS)NzCreating %s)rtrurrr
r
r�rrrr�mkdirrr)r�rur�r-s    r/rzFileOperator.ensure_dirPs����w���t�$�$���t�|�#�#�B�G�N�N�4�,@�,@�#��L���T�"�"�"��7�=�=��&�&�D�A�q��O�O�A�����K�K�
��,�-�-�-��<�
��������{�
,��!�%�%�d�+�+�+�+�+�$�#�#�#�
,�
,r1c��t||��}t�d||��|js�|s|�||��r3|sd}n.|�|��sJ�|t
|��d�}i}|r)ttd��rtj	j
|d<tj|||dfi|��|�|��|S)NzByte-compiling %s to %s�PycInvalidationMode�invalidation_modeT)
rrrrrrbrwr��
py_compilerB�CHECKED_HASH�compiler)	r�ru�optimize�forcer��hashed_invalidation�dpath�diagpath�compile_kwargss	         r/�byte_compilezFileOperator.byte_compile\s��"�$�H��5�5�����-�t�U�;�;�;��|�
	1��
2��
�
�4��/�/�
2��2�#�H�H��?�?�6�2�2�2�2�2�#�C��K�K�L�L�1�H��N�"�
W�w�z�/D�(F�(F�
W�,6�+I�+V��'�)���t�U�H�d�
1�
1�!/�
1�
1�
1����u�%�%�%��r1c��tj�|���r+tj�|��r�tj�|��sft
�d|��|jstj	|��|j
r%||jvr|j�|��dSdSdStj�|��rd}nd}t
�d||��|jstj|��|j
r'||j
vr |j
�|��dSdSdSdS)NzRemoving directory tree at %s�link�filezRemoving %s %s)rtrur
r&rr�debugrr	r�rrr�r)r�rur.s   r/�ensure_removedzFileOperator.ensure_removedusX��
�7�>�>�$���	8��w�}�}�T�"�"�
8�2�7�>�>�$�+?�+?�
8����<�d�C�C�C��|�(��M�$�'�'�'��;�7��t�0�0�0��)�0�0��6�6�6�6�6�7�7�0�0��7�>�>�$�'�'���A�A��A����-�q�$�7�7�7��|�$��I�d�O�O�O��;�8��t�1�1�1��*�1�1�$�7�7�7�7�7�%	8�	8� 8�8�1�1r1c���d}|sitj�|��r tj|tj��}n*tj�|��}||krn|}|�i|Sr)rtrur
�access�W_OKr)r�rur*�parents    r/�is_writablezFileOperator.is_writable�sp�����	��w�~�~�d�#�#�
���4���1�1����W�_�_�T�*�*�F���~�~���D��	��
r1c�\�|jsJ�|j|jf}|���|S)zV
        Commit recorded changes, turn off recording, return
        changes.
        )rrrr)r�r*s  r/�commitzFileOperator.commit�s8��
�{���{��#�T�%6�6���������
r1c���|js�t|j��D]5}tj�|��rtj|���6t|jd���}|D]o}tj	|��}|rC|dgksJ�tj�
||d��}tj|��tj|���p|���dS)NT)�reverse�__pycache__r)
r�listrrtrur
r��sortedr�listdirr&�rmdirr)r�r-�dirsr��flist�sds      r/�rollbackzFileOperator.rollback�s����|�	��$�,�-�-�
!�
!���7�>�>�!�$�$�!��I�a�L�L�L���$�+�T�:�:�:�D��
�
���
�1�
�
���!� �]�O�3�3�3�3�����a��q��2�2�B��H�R�L�L�L���������������r1�F�Tr�)FFNF)r�r�r�r�rrrr r+r.r1r<�set_executable_moderrMrRrWrYrdrDr1r/r�r��s&����������
"�"�"�
)�)�)�C�C�C�((�(�(�(�"
(�
(�
(�
(�%�%�%�<�<�<�
&�
&�
&�D�C��
,�
,�
,�$� � �).�����28�8�8�*
�
�
��������r1r�c�
�|tjvrtj|}nt|��}|�|}nM|�d��}t	||�d����}|D]}t	||��}�|S)N�.r)r��modules�
__import__r�r�rz)�module_name�dotted_path�modr*r-r�s      r/�resolvero�s����c�k�!�!��k�+�&�����%�%��������!�!�#�&�&����e�i�i��l�l�+�+���	(�	(�A��V�Q�'�'�F�F��Mr1c�D�eZdZd�Zed���Zd�Zd�Zej	Z	dS)�ExportEntryc�>�||_||_||_||_dSr��r\r�r�r�)r�r\r�r�r�s     r/r�zExportEntry.__init__�s"����	���������
�
�
r1c�6�t|j|j��Sr�)ror�r�rs r/r�zExportEntry.value�s���t�{�D�K�0�0�0r1c	�H�d|j�d|j�d|j�d|j�d�	S)Nz
<ExportEntry r�r�rV�>rsrs r/�__repr__zExportEntry.__repr__�s2���04�	�	�	�4�;�;�;�04����T�Z�Z�Z�I�	Ir1c��t|t��sd}n@|j|jko/|j|jko|j|jko|j|jk}|Sr)r�rqr\r�r�r�)r��otherr*s   r/�__eq__zExportEntry.__eq__�se���%��-�-�	5��F�F��i�5�:�-�4�$�+���2M�4��+���5�4��*���3�
��
r1N)
r�r�r�r�r�r�rwrzr��__hash__rDr1r/rqrq�sb����������1�1��_�1�I�I�I������H�H�Hr1rqz�(?P<name>([^\[]\S*))
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>[\w-]+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      c��t�|��}|sd}d|vsd|vrtd|z���n�|���}|d}|d}|�d��}|dkr|d}}n0|dkrtd|z���|�d��\}}|d	}	|	�d|vsd|vrtd|z���g}	nd
�|	�d��D��}	t
||||	��}|S)NrIrJzInvalid specification '%s'r\�callabler�rrr�c�6�g|]}|�����SrD�ra)rYr-s  r/r[z$get_export_entry.<locals>.<listcomp>�s ��9�9�9�1�Q�W�W�Y�Y�9�9�9r1rK)�ENTRY_RE�searchr�	groupdict�countr�rq)
�
specificationr)r*r�r\ru�colonsr�r�r�s
          r/r�r��sX�����
�&�&�A��:����-���3�-�#7�#7�"�$*�,9�$:�;�;�
;�$8�
�K�K�M�M����y����}�����C�����Q�;�;�!�4�F�F�F���{�{�&�(.�0=�(>�?�?�?�!�Z�Z��_�_�N�F�F��'�
���=��m�#�#�s�m�';�';�&�(.�0=�(>�?�?�?��E�E�9�9����C�(8�(8�9�9�9�E��T�6�6�5�9�9���Mr1c��|�d}tjdkr.dtjvr tj�d��}ntj�d��}tj�|��r=tj|tj��}|st�
d|��nG	tj|��d}n/#t$r"t�
d	|d�
��d}YnwxYw|s.tj��}t�
d|��tj�||��S)
a�
    Return the default base location for distlib caches. If the directory does
    not exist, it is created. Use the suffix provided for the base directory,
    and default to '.distlib' if it isn't provided.

    On Windows, if LOCALAPPDATA is defined in the environment, then it is
    assumed to be a directory, and will be the parent directory of the result.
    On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
    directory - using os.expanduser('~') - will be the parent directory of
    the result.

    The result is just the directory '.distlib' in the parent directory as
    determined above, or with the name specified with ``suffix``.
    Nz.distlib�nt�LOCALAPPDATAz
$localappdata�~z(Directory exists but is not writable: %sTzUnable to create %s)�exc_infoFz#Default location unusable, using %s)rtr\�environru�
expandvars�
expanduserr&rTrUr�warning�makedirs�OSErrorr�r�r&)r�r*�usables   r/�get_cache_baser�s:���~���	�w�$���>�R�Z�7�7���#�#�O�4�4�����#�#�C�(�(��
�w�}�}�V���
���6�2�7�+�+���	O��N�N�E�v�N�N�N��	��K������F�F���	�	�	��N�N�0�&�4�N�H�H�H��F�F�F�	�����F��!�#�#�����<�f�E�E�E�
�7�<�<���'�'�'s�?C�)D�Dc��tj�tj�|����\}}|r|�dd��}|�tjd��}||zdzS)a
    Convert an absolute path to a directory name for use in a cache.

    The algorithm used is:

    #. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
    #. Any occurrence of ``os.sep`` is replaced with ``'--'``.
    #. ``'.cache'`` is appended.
    r�z---z--z.cache)rtru�
splitdriverr#rv)rur�r�s   r/�path_to_cache_dirr�-sj���7���b�g�o�o�d�3�3�4�4�D�A�q��"�
�I�I�c�5�!�!��	�	�	�"�&�$���A��q�5�8��r1c�:�|�d��s|dzS|Srr)�endswith)r.s r/�ensure_slashr�>s"���:�:�c�?�?���3�w���Hr1c���dx}}d|vr9|�dd��\}}d|vr|}n|�dd��\}}|rt|��}|rt|��}|||fS)NrLrr�)�rsplitr�r)rf�username�passwordr�s    r/�parse_credentialsr�Ds�����H�x�
�f�}�}����s�A�.�.�����f����H�H�!'���c�1�!5�!5��H�h��%��8�$�$���%��8�$�$���X�v�%�%r1c�V�tjd��}tj|��|S)N�)rt�umaskr�s r/�get_process_umaskr�Ss$��
�X�d�^�^�F��H�V�����Mr1c�r�d}d}t|��D]\}}t|t��sd}n�|�J�|S)NTF)�	enumerater�r)�seqr*rkr.s    r/�is_string_sequencer�YsV��
�F��A��#�������1��!�\�*�*�	��F��E�	�
�=�=�=��Mr1z3([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-([a-z0-9_.+-]+)z
-py(\d\.?\d?)c�z�d}d}t|���dd��}t�|��}|r1|�d��}|d|����}|r{t
|��t
|��dzkrXtjtj	|��dz|��}|r,|�
��}|d|�||dzd�|f}|�Gt�|��}|r+|�d��|�d��|f}|S)zw
    Extract name, version, python version from a filename (no extension)

    Return name, version, pyver or None
    NrV�-rz\br�)rr#�PYTHON_VERSIONr�r��startrw�rer�escaper!�PROJECT_NAME_AND_VERSION)�filename�project_namer*�pyverr)�ns      r/�split_filenamer�js+���F��E��x� � �(�(��c�2�2�H����h�'�'�A��(�����
�
���J�Q�W�W�Y�Y�J�'���;��H�
�
��L�(9�(9�A�(=�=�=��H�R�Y�|�,�,�u�4�h�?�?���	;������A��b�q�b�\�8�A��E�F�F�#3�U�:�F�
�~�$�*�*�8�4�4���	3��W�W�Q�Z�Z�������U�2�F��Mr1z-(?P<name>[\w .-]+)\s*\(\s*(?P<ver>[^\s)]+)\)$c���t�|��}|std|z���|���}|d������|dfS)z�
    A utility method used to get name and version from a string.

    From e.g. a Provides-Dist value.

    :param p: A value in a form 'foo (1.0)'
    :return: The name and version as a tuple.
    z$Ill-formed name/version string: '%s'r\�ver)�NAME_VERSION_RErrr�rar�)r�r)r�s   r/�parse_name_and_versionr��sj��	���a� � �A��M��G�!�K�L�L�L�	���
�
�A��V�9�?�?���"�"�$�$�a��h�.�.r1c��t��}t|pg��}t|pg��}d|vr|�d��||z}|D]�}|dkr|�|���|�d��rE|dd�}||vrt�d|z��||vr|�|���x||vrt�d|z��|�|����|S)N�*r�rzundeclared extra: %s)r�r�r
rbrr�)�	requested�	availabler*�r�unwanteds     r/�
get_extrasr��s��
�U�U�F��I�O��$�$�I��I�O��$�$�I�
�i�����������)���
������8�8��J�J�q�M�M�M�M�
�\�\�#�
�
�		�����u�H��y�(�(����5��@�A�A�A��6�!�!��
�
�h�'�'�'���	�!�!����5��9�:�:�:��J�J�q�M�M�M�M��Mr1c��i}	t|��}|���}|�d��}|�d��st�d|��n1t
jd��|��}tj	|��}n3#t$r&}t�d||��Yd}~nd}~wwxYw|S)NzContent-Typezapplication/jsonz(Unexpected response for JSON request: %sr�z&Failed to get external data for %s: %s)r
r�getrbrrQr�r�r�r�r��	exception)r_r*�resp�headers�ct�reader�es       r/�_get_external_datar��s���
�F�K��s�|�|���)�)�+�+��
�[�[��
(�
(���}�}�/�0�0�	'��L�L�C�R�H�H�H�H�.�V�%�g�.�.�t�4�4�F��Y�v�&�&�F����K�K�K����A�3��J�J�J�J�J�J�J�J�����K�����Ms�BB�
C�)C
�
Cz'https://www.red-dove.com/pypi/projects/c��|d����d|�d�}tt|��}t|��}|S)Nrrsz
/project.json��upperr�_external_data_base_urlr�)r\r_r*s   r/�get_project_datar��sB��"&�q�'�-�-�/�/�/�/�4�4�4�
8�C�
�)�3�
/�
/�C�
��
$�
$�F��Mr1c��|d����d|�d|�d�}tt|��}t|��S)Nrrsz	/package-z.jsonr�)r\�versionr_s   r/�get_package_datar��sD��%)�!�W�]�]�_�_�_�_�d�d�d�G�G�G�
D�C�
�)�3�
/�
/�C��c�"�"�"r1c�$�eZdZdZd�Zd�Zd�ZdS)�Cachez�
    A class implementing a cache for resources that need to live in the file system
    e.g. shared libraries. This class was moved from resources to here because it
    could be used by other modules, e.g. the wheel module.
    c�d�tj�|��stj|��tj|��jdzdkrt�d|��tj�tj�	|����|_
dS)zu
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        �?rzDirectory '%s' is not privateN)rtrur&r�rr6rr�r�normpathr)r�rs  r/r�zCache.__init__�s����w�}�}�T�"�"�	��K������G�D�M�M�!�D�(�Q�.�.��N�N�<�d�C�C�C��G�O�O�B�G�$4�$4�T�$:�$:�;�;��	�	�	r1c� �t|��S)zN
        Converts a resource prefix to a directory name in the cache.
        )r�)r�r�s  r/�
prefix_to_dirzCache.prefix_to_dir�s��!��(�(�(r1c���g}tj|j��D]�}tj�|j|��}	tj�|��stj�|��rtj|��n3tj�|��rtj
|����#t$r|�|��Y��wxYw|S)z"
        Clear the cache.
        )
rtr_rrur&rrr�r&r	r�r�r$)r��not_removed�fns   r/�clearzCache.clear�s������*�T�Y�'�'�	'�	'�B�����d�i��,�,�B�
'��7�>�>�"�%�%�&������);�);�&��I�b�M�M�M�M��W�]�]�2�&�&�&��M�"�%�%�%����
'�
'�
'��"�"�2�&�&�&�&�&�
'�����s�BC�C-�,C-N)r�r�r��__doc__r�r�r�rDr1r/r�r��sK��������<�<�<�)�)�)�����r1r�c�2�eZdZdZd�Zd	d�Zd�Zd�Zd�ZdS)
�
EventMixinz1
    A very simple publish/subscribe system.
    c��i|_dSr�)�_subscribersrs r/r�zEventMixin.__init__
s������r1Tc��|j}||vrt|g��||<dS||}|r|�|��dS|�|��dS)a`
        Add a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be added (and called when the
                           event is published).
        :param append: Whether to append or prepend the subscriber to an
                       existing subscriber list for the event.
        N)r�rr$�
appendleft)r��event�
subscriberr$�subs�sqs      r/r
zEventMixin.add
so��� ���������-�-�D��K�K�K��e��B��
*��	�	�*�%�%�%�%�%��
�
�j�)�)�)�)�)r1c�v�|j}||vrtd|z���||�|��dS)z�
        Remove a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be removed.
        zNo subscribers: %rN)r�r�r�)r�r�r�r�s    r/r�zEventMixin.remove!sI��� �������1�E�9�:�:�:��U����:�&�&�&�&�&r1c�R�t|j�|d����S)z�
        Return an iterator for the subscribers for an event.
        :param event: The event to return subscribers for.
        rD)�iterr�r�)r�r�s  r/�get_subscriberszEventMixin.get_subscribers-s%��
�D�%�)�)�%��4�4�5�5�5r1c��g}|�|��D]Q}	||g|�Ri|��}n,#t$rt�d��d}YnwxYw|�|���Rt�d||||��|S)a^
        Publish a event and return a list of values returned by its
        subscribers.

        :param event: The event to publish.
        :param args: The positional arguments to pass to the event's
                     subscribers.
        :param kwargs: The keyword arguments to pass to the event's
                       subscribers.
        z"Exception during event publicationNz/publish %s: args = %s, kwargs = %s, result = %s)r�r�rr�r$rQ)r�r��args�kwargsr*r�r�s       r/�publishzEventMixin.publish4s������.�.�u�5�5�	!�	!�J�
�"�
�5�:�4�:�:�:�6�:�:�����
�
�
�� � �!E�F�F�F�����
����
�M�M�%� � � � ����F���6�6�	+�	+�	+��
s�(�&A�ANrf)	r�r�r�r�r�r
r�r�r�rDr1r/r�r�sn�����������*�*�*�*�(
'�
'�
'�6�6�6�����r1r�c�f�eZdZd�Zd�Zdd�Zd�Zd�Zd�Zd�Z	e
d	���Ze
d
���ZdS)
�	Sequencerc�H�i|_i|_t��|_dSr�)�_preds�_succsr��_nodesrs r/r�zSequencer.__init__Qs���������e�e����r1c�:�|j�|��dSr�)r�r
)r��nodes  r/�add_nodezSequencer.add_nodeVs�����������r1Fc�0�||jvr|j�|��|r�t|j�|d����D]}|�||���t|j�|d����D]}|�||���t
|j�����D]\}}|s|j|=�t
|j�����D]\}}|s|j|=�dSdS)NrD)r�r�r�r�r�r�r]r�)r�r��edgesr�r.r�rSs       r/�remove_nodezSequencer.remove_nodeYs3���4�;����K���t�$�$�$��	'�������r�2�2�3�3�
%�
%�����A�t�$�$�$�$�������r�2�2�3�3�
%�
%�����D�!�$�$�$�$��T�[�.�.�0�0�1�1�
'�
'���1��'���A����T�[�.�.�0�0�1�1�
'�
'���1��'���A���	'�	'�
'�
'r1c��||ksJ�|j�|t�����|��|j�|t�����|��dSr�)r��
setdefaultr�r
r�)r��pred�succs   r/r
z
Sequencer.addisi���t�|�|�|�|�����t�S�U�U�+�+�/�/��5�5�5�����t�S�U�U�+�+�/�/��5�5�5�5�5r1c�(�||ksJ�	|j|}|j|}n #t$rtd|z���wxYw	|�|��|�|��dS#t$rt|�d|�����wxYw)Nz%r not a successor of anythingz not a successor of )r�r��KeyErrorr�r�)r�r�r��preds�succss     r/r�zSequencer.removens����t�|�|�|�|�	F��K��%�E��K��%�E�E���	F�	F�	F��=��D�E�E�E�	F����	H��L�L������L�L���������	H�	H�	H��4�4�4���F�G�G�G�	H���s�%�A�*A2�2Bc�8�||jvp||jvp||jvSr�)r�r�r�)r��steps  r/�is_stepzSequencer.is_step{s.�����#�'�t�t�{�':�'��4�;�&�	(r1c��|�|��std|z���g}g}t��}|�|��|r�|�d��}||vr1||kr*|�|��|�|��nZ|�|��|�|��|j�|d��}|�	|��|��t|��S)NzUnknown: %rrrD)rr�r�r$rzr�r
r�r��extend�reversed)r��finalr*�todo�seenrr�s       r/�	get_stepszSequencer.get_stepss���|�|�E�"�"�	4��]�U�2�3�3�3������u�u�����E�����	#��8�8�A�;�;�D��t�|�|��5�=�=��M�M�$�'�'�'��M�M�$�'�'�'����������
�
�d�#�#�#������b�1�1�����E�"�"�"��	#� ����r1c�v��������dg�g�i�i�g�|j��������fd���D]}|�vr�|����S)Nrc�<���d�|<�d�|<�dxxdz
cc<�
�|��	�|}n#t$rg}YnwxYw|D]T}|�vr+�|��t�|�|���|<�1|�
vrt�|�|���|<�U�|�|krZg}	�
���}|�|��||krn�1t	|��}�	�|��dSdS�Nrr)r$r��minrz�tuple)r��
successors�	successor�connected_component�	component�graph�index�
index_counter�lowlinksr*�stack�
strongconnects     �������r/rz3Sequencer.strong_connections.<locals>.strongconnect�sy���'��*�E�$�K�*�1�-�H�T�N��!�����!�����L�L�����
 �"�4�[�
�
���
 �
 �
 ��
�
�
�
 ����'�
K�
K�	��H�,�,�!�M�)�,�,�,�%(��$���)�9L�%M�%M�H�T�N�N��%�'�'�&)��$���y�9I�%J�%J�H�T�N����~��t��,�,�&(�#�� %�	�	���I�'�.�.�y�9�9�9� �D�(�(��	�
"�"5�6�6�	��
�
�i�(�(�(�(�(�-�,s�A�A�A)r�)	r�r�rrrrr*rrs	  @@@@@@@r/�strong_connectionszSequencer.strong_connections�s������������
������������!	)�!	)�!	)�!	)�!	)�!	)�!	)�!	)�!	)�!	)�!	)�F�	$�	$�D��8�#�#��
�d�#�#�#���
r1c	��dg}|jD]0}|j|}|D]}|�d|�d|�d�����1|jD]}|�d|z���|�d��d�|��S)Nzdigraph G {z  z -> rUz  %s;�}�
)r�r$r�r&)r�r*r�r�r�r�s      r/�dotz
Sequencer.dot�s�������K�	<�	<�D��K��%�E��
<�
<���
�
�
�t�t�t�T�T�T�:�;�;�;�;�
<��K�	*�	*�D��M�M�'�D�.�)�)�)�)��
�
�c�����y�y�� � � r1Nre)
r�r�r�r�r�r�r
r�rr	�propertyrrrDr1r/r�r�Os����������
���'�'�'�'� 6�6�6�
H�H�H�(�(�(� � � �2�1�1��X�1�f�	!�	!��X�	!�	!�	!r1r�)�.tar.gz�.tar.bz2�.tar�.zip�.tgz�.tbz�.whlTc�������fd�}tj�����t����d}|�x|�d��rd}n`|�d��rd}d}nF|�d��rd}d	}n,|�d
��rd}d}ntd
|z���	|dkr7t
|d��}|r$|���}|D]
}||���n;tj	||��}|r$|�
��}|D]
}||���|dkrftjddkrP|�
��D];}	t|	jt ��s|	j�d��|	_�<d�}
|
|_|����|r|���dSdS#|r|���wwxYw)Nc�P��t|t��s|�d��}tj�tj��|����}|����r|�tjkrtd|z���dS)Nr�zpath outside destination: %r)
r�r�decodertrurr&rbrvr�)rur��dest_dir�plens  ��r/�
check_pathzunarchive.<locals>.check_path�s�����$�	�*�*�	(��;�;�w�'�'�D��G�O�O�B�G�L�L��4�8�8�9�9���|�|�H�%�%�	A��4��B�F�):�):��;�a�?�@�@�@�*;�):r1)r"r%�zip)rr#�tgzzr:gz)r r$�tbzzr:bz2r!�tarr�zUnknown format for %rrr�r�c��	tj||��S#tj$r!}tt	|�����d}~wwxYw)z9Run tarfile.tar_filter, but raise the expected ValueErrorN)�tarfile�
tar_filter�FilterErrorr��str)�memberru�excs   r/�extraction_filterz$unarchive.<locals>.extraction_filtersP��
+��)�&�$�7�7�7���&�
+�
+�
+� ��S���*�*�*�����
+���s��A�A�A)rtrurrwr�r�r�namelistr1r'�getnamesr�r��
getmembersr�r\rr(r7�
extractallr�)�archive_filenamer)�formatrr+�archiver;�namesr\�tarinfor7r*s `         @r/�	unarchiverA�sp����A�A�A�A�A�A��w���x�(�(�H��x�=�=�D��G�
�~��$�$�%5�6�6�	I��F�F�
�
&�
&�':�
;�
;�
	I��F��D�D�
�
&�
&�';�
<�
<�	I��F��D�D�
�
&�
&�v�
.�
.�	I��F��D�D��4�7G�G�H�H�H�'��U�?�?��.��4�4�G��
%��(�(�*�*��!�%�%�D��J�t�$�$�$�$���l�#3�T�:�:�G��
%��(�(�*�*��!�%�%�D��J�t�$�$�$�$��U�?�?�s�/��2�Q�6�6�
#�-�-�/�/�
@�
@��!�'�,�	�:�:�@�#*�<�#6�#6�w�#?�#?�G�L��
	+�	+�	+�%6��!����8�$�$�$��	��M�M�O�O�O�O�O�	�	��7�	��M�M�O�O�O�O�	���s
�4DG�G*c��tj��}t|��}t|d��5}t	j|��D]k\}}}|D]b}tj�||��}||d�}	tj�|	|��}
|�||
���c�l	ddd��n#1swxYwY|S)z*zip a directory tree into a BytesIO objectr#N)	�io�BytesIOrwrrt�walkrur&r�)�	directoryr*�dlen�zfrxrar:r\�full�relr�s           r/�zip_dirrK%s��
�Z�\�\�F��y�>�>�D�	���	�	�%��!#���!3�!3�	%�	%��D�$���
%�
%���w�|�|�D�$�/�/���4�5�5�k���w�|�|�C��.�.������t�$�$�$�$�	
%�	%�%�%�%�%�%�%�%�%�%�%�%����%�%�%�%��Ms�BC�C�C)r�K�M�G�T�Pc��eZdZdZdd�Zd�Zd�Zd�Zd�Ze	d	���Z
e	d
���Zd�Ze	d���Z
e	d
���ZdS)�Progress�UNKNOWNr�dc�n�|�||ksJ�|x|_|_||_d|_d|_d|_dS)NrF)r
�cur�max�started�elapsed�done)r��minval�maxvals   r/r�zProgress.__init__=sE���~��6�!1�!1�!1�1�$�$���4�8������������	�	�	r1c��|j|ksJ�|j�
||jksJ�||_tj��}|j�	||_dS||jz
|_dSr�)r
rWrV�timerXrY)r��curval�nows   r/�updatezProgress.updateEsf���x�6�!�!�!�!��x��6�T�X�#5�#5�#5�5�����i�k�k���<���D�L�L�L����-�D�L�L�Lr1c�P�|dksJ�|�|j|z��dS)Nr)rarV)r��incrs  r/�	incrementzProgress.incrementOs-���q�y�y�y�y����D�H�t�O�$�$�$�$�$r1c�:�|�|j��|Sr�)rar
rs r/r�zProgress.startSs�����D�H�����r1c�V�|j�|�|j��d|_dS�NT)rWrarZrs r/�stopz
Progress.stopWs)���8���K�K���!�!�!���	�	�	r1c�,�|j�|jn|jSr�)rW�unknownrs r/�maximumzProgress.maximum\s��#�x�/�t�|�|�T�X�=r1c�|�|jrd}n1|j�d}n'd|j|jz
z|j|jz
z}d|z}|S)Nz100 %z ?? %gY@z%3d %%)rZrWrVr
)r�r*rSs   r/�
percentagezProgress.percentage`sQ���9�	"��F�F�
�X�
��F�F����D�H�,�-���D�H�1D�E�A���\�F��
r1c��|dkr|j�|j|jkrd}n'tjdtj|����}|S)Nrz??:??:??z%H:%M:%S)rWrVr
r^�strftime�gmtime)r��durationr*s   r/�format_durationzProgress.format_durationksI����M�M�t�x�/�4�8�t�x�3G�3G��F�F��]�:�t�{�8�/D�/D�E�E�F��
r1c�"�|jr
d}|j}ned}|j�d}nY|jdks|j|jkrd}n;t|j|jz
��}||j|jz
z}|dz
|jz}|�d|�|����S)N�DonezETA r�rrz: )rZrYrWrVr
�floatrr)r�r�rls   r/�ETAzProgress.ETAts����9�	+��F���A�A��F��x��������"�"�t�x�4�8�';�';�����$�(�T�X�-�.�.���T�X���(�(����U�d�l�*��!�6�6�4�#7�#7��#:�#:�#:�;�;r1c��|jdkrd}n|j|jz
|jz}tD]}|dkrn|dz}�d||fzS)Nrgi�g@�@z%d %sB/s)rYrVr
�UNITS)r�r*�units   r/�speedzProgress.speed�sc���<�1����F�F��h���)�T�\�9�F��	�	�D���}�}����f��F�F��V�T�N�*�*r1N)rrT)r�r�r�rjr�rardr�rhrrkrmrrrvrzrDr1r/rRrR:s��������G�����.�.�.�%�%�%�������
�>�>��X�>�����X������<�<��X�<�$�	+�	+��X�	+�	+�	+r1rRz\{([^}]*)\}z[^/\\,{]\*\*|\*\*[^/\\,}]z^[^{]*\}|\{[^}]*$c���t�|��rd}t||z���t�|��rd}t||z���t	|��S)zAExtended globbing function that supports ** and {opt1,opt2,opt3}.z7invalid glob %r: recursive glob "**" must be used alonez2invalid glob %r: mismatching set marker '{' or '}')�_CHECK_RECURSIVE_GLOBr�r��_CHECK_MISMATCH_SET�_iglob)�	path_globrs  r/rr�sj���#�#�I�.�.�*�K����y��)�)�)��!�!�)�,�,�*�F����y��)�)�)��)���r1c#��K�t�|d��}t|��dkrit|��dks
J|���|\}}}|�d��D].}td�|||f����D]}|V���/dSd|vrt|��D]}|V��dS|�dd��\}}|dkrd}|dkrd}n*|�d��}|�d	��}tj|��D]Y\}}}	tj	�
|��}ttj	�||����D]}
|
V���ZdS)
Nrr�rKrz**rir�rs�\)�	RICH_GLOBr�rwr~r&�	std_iglobr'rtrErur�)r�rich_path_globr�r�r��itemru�radical�dirr:r�s           r/r~r~�s������_�_�Y��2�2�N�
�>���Q����>�"�"�a�'�'�'��'�'�'�,����V��I�I�c�N�N�	�	�D��r�w�w���f�'=�>�>�?�?�
�
���
�
�
�
�
�	�	��y� � �!�)�,�,�
�
���
�
�
�
�
�
�(�o�o�d�A�6�6�O�F�G���|�|����"�}�}����"�.�.��-�-��!�.�.��.�.��$&�G�F�O�O�
�
� ��c�5��w�'�'��-�-�� �����d�G�!<�!<�=�=���B��H�H�H�H��
�
r1)�HTTPSHandler�match_hostname�CertificateErrorc��eZdZdZdZd�ZdS)�HTTPSConnectionNTc���tj|j|jf|j��}t|dd��r||_|���tj	tj
��}ttd��r|xjtj
zc_t|dd��r |�|j|j��i}|jrLtj|_|�|j���ttdd��r
|j|d<|j|fi|��|_|jr�|jr�	t/|j���|j��t2�d|j��dS#t6$r?|j�tj��|j����wxYwdSdS)	N�_tunnel_hostF�OP_NO_SSLv2�	cert_file)�cafile�HAS_SNI�server_hostnamezHost verified: %s)r��create_connection�host�port�timeoutr��sock�_tunnel�ssl�
SSLContext�PROTOCOL_SSLv23r��optionsr��load_cert_chainr��key_file�ca_certs�
CERT_REQUIRED�verify_mode�load_verify_locations�wrap_socket�check_domainr��getpeercertrrQr��shutdown�	SHUT_RDWRr�)r�r��contextr�s    r/�connectzHTTPSConnection.connect�s����+�T�Y��	�,B�,0�L�:�:�D��t�^�U�3�3�
� ��	��������n�S�%8�9�9�G��s�M�*�*�
3����3�?�2����t�[�$�/�/�
G��'�'����
�F�F�F��F��}�
:�&)�&7��#��-�-�T�]�-�C�C�C��3�	�5�1�1�:�04�	�F�,�-�+��+�D�;�;�F�;�;�D�I��}�
��!2�
��"�4�9�#8�#8�#:�#:�D�I�F�F�F��L�L�!4�d�i�@�@�@�@�@��'�����I�&�&�v�'7�8�8�8��I�O�O�%�%�%������	
�
�
�
s�AF�A	G)r�r�r�r�r�r�rDr1r/r�r��s-����������	�	�	�	�	r1r�c�"�eZdZdd�Zd�Zd�ZdS)r�Tc�J�tj|��||_||_dSr�)�BaseHTTPSHandlerr�r�r�)r�r�r�s   r/r�zHTTPSHandler.__init__�s(���%�d�+�+�+�$�D�M� ,�D���r1c�\�t|i|��}|jr|j|_|j|_|S)a
            This is called to create a connection instance. Normally you'd
            pass a connection class to do_open, but it doesn't actually check for
            a class, and just expects a callable. As long as we behave just as a
            constructor would have, we should be OK. If it ever changes so that
            we *must* pass a class, we'll create an UnsafeHTTPSConnection class
            which just sets check_domain to False in the class definition, and
            choose which one to pass to do_open.
            )r�r�r�)r�r�r�r*s    r/�_conn_makerzHTTPSHandler._conn_maker�s9��%�d�5�f�5�5�F��}�
8�"&�-���&*�&7��#��Mr1c��	|�|j|��S#t$r3}dt|j��vrtd|jz����d}~wwxYw)Nzcertificate verify failedz*Unable to verify server certificate for %s)�do_openr�rr4�reasonr�r�)r�rgr�s   r/�
https_openzHTTPSHandler.https_opensv��
��|�|�D�$4�c�:�:�:���
�
�
�.�#�a�h�-�-�?�?�*�!�#&�8�,�-�-�-������

���s��
A�.A�ANrf)r�r�r�r�r�r�rDr1r/r�r��sF������	-�	-�	-�	-�
	�	�	� 		�		�		�		�		r1r�c��eZdZd�ZdS)�HTTPSOnlyHandlerc�&�td|z���)NzAUnexpected HTTP request on what should be a secure connection: %s)r)r�rgs  r/�	http_openzHTTPSOnlyHandler.http_opens!���!�#&�'�(�(�
(r1N)r�r�r�r�rDr1r/r�r�s#������	(�	(�	(�	(�	(r1r�c��eZdZdd�Zd�ZdS)�	Transportrc�T�||_tj�||��dSr�)r�rr�r��r�r��use_datetimes   r/r�zTransport.__init__&s(�������$�$�T�<�8�8�8�8�8r1c���|�|��\}}}|jr||jdkr"||_|tj|��f|_|jdSr)�
get_host_info�_connection�_extra_headersr�HTTPConnection)r�r��h�eh�x509s     r/�make_connectionzTransport.make_connection*sf���(�(��.�.���2�t���	?�4�4�+;�A�+>�#>�#>�"$�D��#�W�%;�A�%>�%>�>�D�����"�"r1N�r�r�r�r�r�r�rDr1r/r�r�$s7������9�9�9�9�#�#�#�#�#r1r�c��eZdZdd�Zd�ZdS)�
SafeTransportrc�T�||_tj�||��dSr�)r�rr�r�r�s   r/r�zSafeTransport.__init__6s(��"�D�L��#�,�,�T�<�@�@�@�@�@r1c���|�|��\}}}|si}|j|d<|jr||jdkr!||_|t	j|dfi|��f|_|jdS)Nr�rr)r�r�r�r�rr�)r�r�r�r�r�s     r/r�zSafeTransport.make_connection:s��� �.�.�t�4�4�M�A�r�6��
��� $��F�9���#�
'�t�t�/?��/B�'B�'B�&(��#�#'��)@��t�*'�*'�%�*'�*'�$'�� ��#�A�&�&r1Nr�r�rDr1r/r�r�4s;������	A�	A�	A�	A�		'�		'�		'�		'�		'r1r�c��eZdZd�ZdS)�ServerProxyc�&�|�dd��x|_}|�Yt|��d}|�dd��}|dkrt}nt
}|||���x|d<}||_tjj	||fi|��dS)Nr�rr��https)r��	transport)
rzr�rr�r�r�r�rr�r�)r�rjr�r�rer��tclsrls        r/r�zServerProxy.__init__Hs���!'���I�t�!<�!<�<���w����c�]�]�1�%�F�!�:�:�n�a�8�8�L��� � �$��� ��&*�d�7��&N�&N�&N�N�F�;��!��D�N���&�t�S�;�;�F�;�;�;�;�;r1N)r�r�r�r�rDr1r/r�r�Fs#������<�<�<�<�<r1r�c�j�tjddkr|dz
}n
d|d<d|d<t||fi|��S)Nrr��br�newliner�r%)r�r�r')r�r;r�s   r/�	_csv_openr�_sN��
����Q����������y��%��z����D�#�#�F�#�#�#r1c�\�eZdZed��ed��ed��d�Zd�Zd�ZdS)�CSVBaserK�"r)�	delimiter�	quotechar�lineterminatorc��|Sr�rDrs r/�	__enter__zCSVBase.__enter__q����r1c�8�|j���dSr�)r�r�)r�r�s  r/�__exit__zCSVBase.__exit__ts����������r1N)r�r�r�r4�defaultsr�r�rDr1r/r�r�js_�������S��X�X��S��X�X��#�d�)�)���H��������r1r�c�$�eZdZd�Zd�Zd�ZeZdS)�	CSVReaderc��d|vrC|d}tjddkrtjd��|��}||_nt|dd��|_t
j|jfi|j��|_dS)Nr�rr�r�rur�)	r�r�r�r�r�r��csvr�r�)r�r�r�s   r/r�zCSVReader.__init__zs����v����H�%�F����"�a�'�'�2��)�'�2�2�6�:�:�� �D�K�K�#�F�6�N�C�8�8�D�K��j���>�>��
�>�>����r1c��|Sr�rDrs r/�__iter__zCSVReader.__iter__�r�r1c���t|j��}tjddkrBt	|��D]2\}}t|t��s|�d��||<�3|S�Nrr�r�)�nextr�r�r�r�r�rr()r�r*rkr�s    r/r�zCSVReader.next�sl���d�k�"�"����A���"�"�$�V�,�,�
5�
5���4�!�$�	�2�2�5� $���G� 4� 4�F�1�I���
r1N)r�r�r�r�r�r��__next__rDr1r/r�r�xsB������	?�	?�	?��������H�H�Hr1r�c��eZdZd�Zd�ZdS)�	CSVWriterc�r�t|d��|_tj|jfi|j��|_dS)Nr#)r�r�r��writerr�)r�r�r�s   r/r�zCSVWriter.__init__�s4����C�(�(����j���>�>��
�>�>����r1c��tjddkrHg}|D]A}t|t��r|�d��}|�|���B|}|j�|��dSr�)r�r�r�rr0r$r��writerow)r��rowr�r�s    r/r�zCSVWriter.writerow�s~����A���"�"��A��
�
���d�I�.�.�0��;�;�w�/�/�D����������C�����S�!�!�!�!�!r1N)r�r�r�r�r�rDr1r/r�r��s2������?�?�?�"�"�"�"�"r1r�c�\��eZdZeej��Zded<d�fd�	Zd�Zd�Zd�Z	�xZ
S)	�Configurator�inc_convert�incNc���tt|���|��|ptj��|_dSr�)�superr�r�rtr�r)r��configr�	__class__s   �r/r�zConfigurator.__init__�s7���
�l�D�!�!�*�*�6�2�2�2��'�B�I�K�K��	�	�	r1c�����
��
�fd��
��d��}t|��s��|��}��dd��}��dd��}|rt�
fd�|D����}��
fd��D��}t	|��}||i|��}|r4|���D]\}}	t
||�
|	����� |S)Nc�J��t|ttf��r%t|���fd�|D����}n`t|t��r6d|vr��|��}n1i}|D]}�||��||<�n��|��}|S)Nc�&��g|]
}�|����SrDrD)rYrk�converts  �r/r[zBConfigurator.configure_custom.<locals>.convert.<locals>.<listcomp>�s!���!8�!8�!8��'�'�!�*�*�!8�!8�!8r1�())r�r]r�type�dict�configure_customr�)�or*r�r�r�s   ��r/r�z.Configurator.configure_custom.<locals>.convert�s�����!�d�E�]�+�+�

)� ��a���!8�!8�!8�!8�a�!8�!8�!8�9�9����A�t�$�$�
)��1�9�9�!�2�2�1�5�5�F�F��F��2�2��$+�G�A�a�D�M�M��q�	�	�2����a�����Mr1r�riz[]rDc�&��g|]
}�|����SrDrD)rYrr�s  �r/r[z1Configurator.configure_custom.<locals>.<listcomp>�s!���3�3�3��'�'�!�*�*�3�3�3r1c�T��g|]$}t|���|��|��f��%SrD)r)rYr�r�r�s  ��r/r[z1Configurator.configure_custom.<locals>.<listcomp>�s7���K�K�K�Q�K��N�N�K�!�W�W�V�A�Y�'�'�(�K�K�Kr1)rzr}rorrr��setattr)r�r�r��propsr�r�r�r*r�rSr�s``        @r/rzConfigurator.configure_custom�s#�����	�	�	�	�	�	�
�J�J�t������{�{�	 ����Q���A��
�
�3��%�%���z�z�$��#�#���	5��3�3�3�3�d�3�3�3�4�4�D�K�K�K�K�K�&�K�K�K���e������D�#�F�#�#���	/����
�
�
/�
/���1����7�7�1�:�:�.�.�.�.��
r1c��|j|}t|t��r#d|vr|�|��x|j|<}|S)Nr�)r�r�rr)r�r�r*s   r/�__getitem__zConfigurator.__getitem__�sM����S�!���f�d�#�#�	F�����(,�(=�(=�f�(E�(E�E�D�K���v��
r1c��tj�|��s%tj�|j|��}tj|dd���5}tj|��}ddd��n#1swxYwY|S)z*Default converter for the inc:// protocol.r�r�r$N)	rtru�isabsr&rr�r'r�r�)r�r�r-r*s    r/r�zConfigurator.inc_convert�s����w�}�}�U�#�#�	3��G�L�L���E�2�2�E�
�[���g�
6�
6�
6�	"�!��Y�q�\�\�F�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"����	"�	"�	"�	"��
s�A=�=B�Br�)r�r�r�rr�value_convertersr�rr	r��
__classcell__)r�s@r/r�r��s���������t�,�=�>�>��+��U��(�(�(�(�(�(����@���������r1r�c�&�eZdZdZdd�Zd�Zd�ZdS)�SubprocessMixinzC
    Mixin for running subprocesses and capturing their output
    FNc�"�||_||_dSr�)�verbose�progress)r�rrs   r/r�zSubprocessMixin.__init__�s����� ��
�
�
r1c�~�|j}|j}	|���}|sn�|�
|||��nr|s tj�d��n2tj�|�d����tj�����|���dS)z�
        Read lines from a subprocess' output stream and either pass to a progress
        callable (if specified) or write progress information to sys.stderr.
        TNrir�)	rr�readliner��stderrr�r(�flushr�)r�r�r�rrr.s      r/r�zSubprocessMixin.reader�s���
�=���,��	#����!�!�A��
���#����G�$�$�$�$��8��J�$�$�S�)�)�)�)��J�$�$�Q�X�X�g�%6�%6�7�7�7��
� � �"�"�"�	#�	�������r1c�0�tj|ftjtjd�|��}tj|j|jdf���}|���tj|j|jdf���}|���|�	��|�
��|�
��|j�|�dd��n&|jrtj�d��|S)N)�stdoutrr)rr�rzdone.�mainzdone.
)�
subprocess�Popen�PIPE�	threading�Threadr�rr�r�waitr&rrr�r�)r��cmdr�r��t1�t2s      r/�run_commandzSubprocessMixin.run_command�s�����S�
'�$.�O�$.�O�
'�
'� &�
'�
'���
�T�[���(�7K�
L�
L�
L��
���
�
�
�
�
�T�[���(�7K�
L�
L�
L��
���
�
�
�	������
���	�	�	�
���	�	�	��=�$��M�M�'�6�*�*�*�*�
�\�	(��J���Y�'�'�'��r1)FN)r�r�r�r�r�r�r#rDr1r/rr�sP��������!�!�!�!����*����r1rc�R�tjdd|�����S)z,Normalize a python package name a la PEP 503z[-_.]+r�)r��subr�)r\s r/�normalize_namer&s$���6�(�C��&�&�,�,�.�.�.r1c�*�eZdZdZdZdd�Zd�Zd�ZdS)�
PyPIRCFilezhttps://upload.pypi.org/legacy/�pypiNc��|�=tj�tj�d��d��}||_||_dS)Nr�z.pypirc)rtrur&r�r�r_)r�r�r_s   r/r�zPyPIRCFile.__init__(s>��
�:�����b�g�0�0��5�5�y�A�A�B���
�����r1c��i}tj�|j���r�|jp|j}t
j��}|�|j��|�	��}d|vr�|�
dd��}d�|�d��D��}|gkr	d|vrdg}�n|D]�}d|i}|�
|d��|d<d|jfd	|jfd
fD]:\}}	|�
||��r|�
||��||<�5|	||<�;|dkr||jdfvr|j|d<��|d|kr|d|kri}��nod|vrkd}|�
|d��r|�
|d��}n|j}|�
|d��|�
|d��|||jd
�}|S)N�	distutilsz
index-serversc�f�g|].}|���dk�|�����/S)rr)rY�servers  r/r[z#PyPIRCFile.read.<locals>.<listcomp>:s=�����'-��|�|�~�~��+�+��L�L�N�N�+�+�+r1rr)r.r��
repository�realm)r�Nzserver-loginr�)r�r�r/r.r0)rtrur
r�r_�DEFAULT_REPOSITORYr�RawConfigParserr�r�r�r��
DEFAULT_REALM�
has_option)
r�r*r/r�r��
index_servers�_serversr.r�r�s
          r/r�zPyPIRCFile.read.sT����
�7�>�>�$�-�(�(�6	���<�T�%<�J�!�1�3�3�F��K�K��
�&�&�&����(�(�H��h�&�&� &�
�
�;�� H� H�
���1>�1D�1D�T�1J�1J������r�>�>���)�)�$*�8���"*�(�(��"*�F�!3��-3�Z�Z��
�-K�-K��z�*�/;�.2�.E�.G�.5�t�7I�-J�-?�-A�6�6�L�C�� &�0�0���=�=�6�.4�j�j���.E�.E��s���.5��s���
#�f�,�,��$(�$;�V�#D�2E�2E�37�3J�F�<�0�0�$�X�.�*�<�<�"(��"6�*�"D�"D�%'�F��-(�. �8�+�+�'���$�$�V�\�:�:�9�!'���F�L�!A�!A�J�J�!%�!8�J� &�
�
�6�:� >� >� &�
�
�6�:� >� >�",�$�!�/�����
r1c��tj��}|j}|�|��|�d��s|�d��|�dd|��|�dd|��t|d��5}|�|��ddd��dS#1swxYwYdS)Nr)r�r�r#)	rr2r�r��has_sectionr�r�r'r�)r�r�r�r�r�r-s      r/razPyPIRCFile.updatejs����-�/�/��
�]�����B�����!�!�&�)�)�	'����v�&�&�&��
�
�6�:�x�0�0�0��
�
�6�:�x�0�0�0�
�"�c�]�]�	�a��L�L��O�O�O�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�B;�;B?�B?�NN)r�r�r�r1r3r�r�rarDr1r/r(r(#sR������:���M�����:�:�:�x
�
�
�
�
r1r(c�P�t|j������S)zG
    Read the PyPI access configuration as supported by distutils.
    )r_)r(r_r��rs r/�_load_pypircr<ws#���%�)�$�$�$�)�)�+�+�+r1c�^�t���|j|j��dSr�)r(rar�r�r;s r/�
_store_pypircr>~s&���L�L�������7�7�7�7�7r1c�$�tjdkrrdtj���vrdSdtj���vrdSdtj���vrdStjSdtjvrtjdStjd	ksttd
��stjStj��\}}}}}|����	dd��}|�	d
d���	dd��}|dd�dkr|�d|��S|dd�dkrQ|ddkrDd}dt|d��dz
|dd�fz}ddd�}|d|tjzz
}n�|dd�dkrddlm
}|��S|dd �d!krMd!}tjd"tj��}|�|��}|r|���}n\|dd �d#krNddl}		dd$lm}
n#t,$rddl}
YnwxYw|	�|
���|||��\}}}|�d|�d|��S)%a�Return a string that identifies the current platform.  This is used mainly to
    distinguish platform-specific build directories and platform-specific built
    distributions.  Typically includes the OS name and version and the
    architecture (as supplied by 'os.uname()'), although the exact information
    included depends on the OS; eg. on Linux, the kernel version isn't
    particularly important.

    Examples of returned values:
       linux-i586
       linux-alpha (?)
       solaris-2.6-sun4u

    Windows will return one of:
       win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc)
       win32 (all others - specifically, sys.platform is returned)

    For other non-POSIX platforms, currently just returns 'sys.platform'.

    r��amd64�	win-amd64z(arm)�	win-arm32z(arm64)z	win-arm64�_PYTHON_HOST_PLATFORMr3�unamersrrVrmr�N��linux�sunosr�5�solarisz%d.%sr���32bit�64bit)i���l����z.%s�aix)�aix_platform��cygwinz[\d.]+�darwin)�	sysconfig)rtr\r�r�r��platformr�r�rDr#�int�maxsize�_aix_supportrNr�rF�ASCIIrr��_osx_supportr,rR�ImportError�get_platform_osx�get_config_vars)�osnamer��releaser��machine�bitnessrN�rel_rer)rXrRs           r/�get_host_platformra�s���(
�w�$����c�k�'�'�)�)�)�)��;��c�k�'�'�)�)�)�)��;����)�)�+�+�+�+��;��|���"�*�,�,��z�1�2�2�	�w�'�����W�!5�!5���|��13��
�
�-�V�T�7�G�W��\�\�^�^�
#�
#�C��
,�
,�F��o�o�c�3�'�'�/�/��S�9�9�G�
�b�q�b�z�W���!�&�&�'�'�*�*�	�����w�	�	��1�:�����F���W�Q�Z���1�!4�g�a�b�b�k� B�B�G�$+��I�I�G��u�w�s�{�3�3�3�G��	�����u�	�	�-�-�-�-�-�-��|�~�~��	�����x�	�	�����I�r�x�0�0���L�L��!�!���	 ��g�g�i�i�G��	�����x�	�	�����	�+�+�+�+�+�+�+���	�	�	�������	����#/�#@�#@��%�%�'�'���'�$C�$C� ���� ������'�'�2�2s�?I�I�I�win32rArB)�x86�x64�armc���tjdkrt��Stj�d��}|t
vrt��St
|S)Nr��VSCMD_ARG_TGT_ARCH)rtr\rar�r��_TARGET_TO_PLAT)�cross_compilation_targets r/�get_platformrj�sQ��	�w�$��� �"�"�"�!�z�~�~�.B�C�C����6�6� �"�"�"��3�4�4r1r9)r�r�rg)�r��collectionsr�
contextlibr��globrr�rCr��loggingrtrDr�r�r�rYrr�r1r�r�r�dummy_threadingr^rr�compatrrr	r
rrr
rrrrrrrrrrrrr�	getLoggerr�rrFrrPrOr:rCr?rdr%rFror�r�r�r�r�r�r��contextmanagerr�r�r�r�r�r�r�rorq�VERBOSEr�r�r�r�r�r�r�r��Ir�r�r�r�r�r�r�r�r�r�r�r�r��ARCHIVE_EXTENSIONSrArKrxrRr�r|r}r~r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr&r(r<r>rarhrjrDr1r/�<module>rvs�	��
�
�
�
�����������
�
�
�
�#�#�#�#�#�#�	�	�	�	���������	�	�	�	�����	�	�	�	�
�
�
�
���J�J�J�J������
�C�C�C���������
�
�
�
�������������(��������(�(�(�'�'�'�'�'�'�(��������������(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�(�
��	�8�	$�	$���R�Z�)�
*�
*�
��R�Z� 3�4�4��
�R�Z�5�
6�
6�
��B�J�D�E�E�	��R�Z������b�j������B�J�{�#�#�	��r�z�E�F�F��X!�X!�X!�vB%�B%�B%�J���4������$

�

�

�

� ���,�,�,�^���&����������������&�&�&���&�
�
�
�
�
�f�
�
�
�  � � �6~�~�~�~�~�6�~�~�~�B��������&����8�2�:���:�	'�'�����>&(�&(�&(�&(�R���"
�
�
�&�&�&�������&�2�:���t�������,�-�-������4�"�*�9�:�:��
/�
/�
/� ���8���*D�����#�#�#�)�)�)�)�)�F�)�)�)�XD�D�D�D�D��D�D�D�TG!�G!�G!�G!�G!��G!�G!�G!�\��A�A�A�A�H���$	&��W+�W+�W+�W+�W+�v�W+�W+�W+�|
�B�J�~�&�&�	�"��
�#?�@�@�� �b�j�!5�6�6��������8�Z(�+�+�+�+�+�+�+�+�+�+� � � � � �'�1� � � �D � � � � �'� � � �V(�(�(�(�(�<��(�(�(�#�#�#�#�#�	�#�#�#�#��'�'�'�'�'�'�	�/�'�'�'�$<�<�<�<�<�)�'�<�<�<�2$�$�$������f�������������6"�"�"�"�"��"�"�"�,5�5�5�5�5�#�5�5�5�p.�.�.�.�.�f�.�.�.�b/�/�/�"Q�Q�Q�Q�Q��Q�Q�Q�h,�,�,�8�8�8�Q3�Q3�Q3�j������5�5�5�5�5s!�;�A�A�A"�"	A.�-A.