� ��^i�����ddlmZddlZddlZddlZddlmZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlmZmZddlmZmZmZmZmZddlmZddlmZmZm Z m!Z!dd l"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,dd l-m.Z.m/Z/e j0e1��Z2da3e4ed ��rd Z5n-ej6�7d ��rdZ5nej6dkrdZ5ndZ5ej8d��Z9e9sdej:dd�zZ9de9zZ;e5e9zZ<e,���=dd���=dd��Z>ej8d��Z?e?rEe?�7d��r0e?�=dd���@d��dZ?nd�ZAeA��Z?[Ae jBde jCe jDz��ZEe jBde jCe jDz��ZFe jBd��ZGe jBd��ZHd ZId!ZJe jKd"krd#�ZLnd$�ZLGd%�d&eM��ZNeN��ZOGd'�d(eM��ZPd)�ZQd*�ZReR��ZS[Rd,d+�ZTdS)-�)�unicode_literalsN)�message_from_file�)� __version__�DistlibException)� sysconfig�ZipFile�fsdecode� text_type�filter)�InstalledDistribution)�Metadata�METADATA_FILENAME�WHEEL_METADATA_FILENAME�LEGACY_METADATA_FILENAME) � FileOperator� convert_path� CSVReader� CSVWriter�Cache�cached_property�get_cache_base� read_exports�tempdir� get_platform)�NormalizedVersion�UnsupportedVersionError�pypy_version_info�pp�java�jy�cli�ip�cp�py_version_nodotz%s%s��py�-�_�.�SOABIzcpython-c�<�dtg}tjd��r|�d��tjd��r|�d��tjd��dkr|�d��d �|��S) Nr$�Py_DEBUG�d� WITH_PYMALLOC�m�Py_UNICODE_SIZE��u�)� VER_SUFFIXr�get_config_var�append�join)�partss ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/distlib/wheel.py� _derive_abir;<s����z�"�� � #�J� /� /� � �L�L�� � � � � #�O� 4� 4� � �L�L�� � � � � #�$5� 6� 6�!� ;� ;� �L�L�� � � ��w�w�u�~�~��zz (?P[^-]+) -(?P\d+[^-]*) (-(?P\d+[^-]*))? -(?P\w+\d+(\.\w+\d+)*) -(?P\w+) -(?P\w+(\.\w+)*) \.whl$ z7 (?P[^-]+) -(?P\d+[^-]*) (-(?P\d+[^-]*))?$ s \s*#![^\r\n]*s^(\s*#!("[^"]+"|\S+))\s+(.*)$s#!pythons #!pythonw�/c��|S�N���os r:�rC^s���r<c�B�|�tjd��S)Nr=)�replace�os�seprAs r:rCrC`s�����2�6�3�/�/�r<c�.�eZdZd�Zd�Zd�Zdd�Zd�ZdS)�Mounterc�"�i|_i|_dSr?)� impure_wheels�libs��selfs r:�__init__zMounter.__init__ds������� � � r<c�N�||j|<|j�|��dSr?)rKrL�update)rN�pathname� extensionss r:�addz Mounter.addhs+��'1���8�$� � ����$�$�$�$�$r<c�l�|j�|��}|D]\}}||jvr|j|=�dSr?)rK�poprL)rNrRrS�k�vs r:�removezMounter.removelsJ���'�+�+�H�5�5� �� !� !�D�A�q��D�I�~�~��I�a�L�� !� !r<Nc�"�||jvr|}nd}|Sr?)rL)rN�fullname�path�results r:� find_modulezMounter.find_modulers �� �t�y� � ��F�F��F�� r<c�8�|tjvrtj|}nx||jvrtd|z���t j||j|��}||_|�dd��}t|��dkr |d|_ |S)Nzunable to find extension for %sr*rr) �sys�modulesrL� ImportError�imp� load_dynamic� __loader__�rsplit�len� __package__)rNr[r]r9s r:� load_modulezMounter.load_moduleys��� �s�{� "� "��[��*�F�F��t�y�(�(�!�"C�h�"N�O�O�O��%�h�� �(�0C�D�D�F� $�F� ��O�O�C��+�+�E��5�z�z�A�~�~�%*�1�X��"�� r<r?)�__name__� __module__� __qualname__rOrTrYr^rir@r<r:rIrIcsd���������%�%�%�!�!�!� ���� � � � � r<rIc���eZdZdZdZdZdd�Zed���Zed���Z ed ���Z e d ���Z d �Z e d ���Zd �Zdd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd d�Zd�Zd�Zdd�ZdS)!�Wheelz@ Class to build and install from Wheel files (PEP 427). )rr�sha256NFc���||_||_d|_tg|_dg|_dg|_tj��|_ |�d|_ d|_ |j |_ dSt�|��}|r^|�d��}|d|_ |d�d d ��|_ |d |_|j |_ dStj�|��\}}t(�|��}|st+d |z���|r$tj�|��|_ ||_ |�d��}|d|_ |d|_ |d |_|d �d��|_|d�d��|_|d�d��|_dS)zB Initialise an instance using a (valid) filename. r4�none�anyN�dummyz0.1�nm�vnr)r(�bnzInvalid name or filename: %rr'r*�bi�ar)�sign� should_verify�buildver�PYVER�pyver�abi�archrF�getcwd�dirname�name�version�filename� _filename�NAME_VERSION_RE�match� groupdictrEr\�split� FILENAME_REr�abspath)rNr�ry�verifyr0�infor�s r:rOzWheel.__init__�s����� �#����� ��W�� ��8����G�� ��y�{�{�� � � ��D�I� �D�L�!�]�D�N�N�N��%�%�h�/�/�A�� 2��{�{�2���� ��J�� �#�D�z�1�1�#�s�;�;�� � $�T� �� �!%������$&�G�M�M�(�$;�$;�!����%�%�h�/�/���F�*�,:�z"Wheel.metadata..����!5�!5�!5�Q�#�a�&�&�!5�!5�!5r<)�fileobjz8Invalid wheel, because metadata is missing: looked in %sz, )rFr\r8r�r�r�r��codecs� getreaderr �get_wheel_metadatar��tuplerr� posixpath�openr�KeyError� ValueError)rNrR�name_ver�info_dir�wrapper�zf�wheel_metadata�wv� file_version�fnsr]�fn�metadata_filename�bf�wfs r:�metadatazWheel.metadata�s\���7�<�<�� �d�m�<�<��"�i�i�i����6��!�H�,���"�7�+�+�� �X�s� #� #� K�r�!�4�4�R�8�8�N���0�6�6�s�A�>�>�B� �!5�!5�"�!5�!5�!5�6�6�L� +�,D�E�C��F�� � ���(1��x��(D�(D�%����!2�3�3�"�r�$�W�R�[�[��!)�"�!5�!5�!5��!�"�!� "�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"�"����"�"�"�"���  �����D������ K� �"9�;?�9�9�S�>�>�"J�K�K�K� K�+ K� K� K� K� K� K� K� K� K� K� K���� K� K� K� K�0� sg�%AE8�*D4�/D(� D4�E8� D4�(D, �,D4�/D, �0D4�3E8�4 E�>E8�E�*E8�8E<�?E<c�(�|j�d|j��}d|z}tj|d��}|�|��5}t jd��|��}t|��}ddd��n #1swxYwYt|��S)Nr(r��WHEELr�) r�r�r�r8r�r�r�r�dict)rNr�r�r�r�r�r��messages r:r�zWheel.get_wheel_metadata�s���"�i�i�i����6��!�H�,��%�N�8�W�=�=�� �W�W�&� '� '� ,�2�*��!�'�*�*�2�.�.�B�'��+�+�G� ,� ,� ,� ,� ,� ,� ,� ,� ,� ,� ,���� ,� ,� ,� ,��G�}�}�s�-A:�:A>�A>c���tj�|j|j��}t |d��5}|�|��}ddd��n #1swxYwY|S)Nr�)rFr\r8r�r�r r�)rNrRr�r]s r:r�z Wheel.infos����7�<�<�� �d�m�<�<�� �X�s� #� #� 1�r��,�,�R�0�0�F� 1� 1� 1� 1� 1� 1� 1� 1� 1� 1� 1���� 1� 1� 1� 1�� s�A�A!�$A!c��t�|��}|r�|���}|d|�||d�}}d|���vrt}nt }t �|��}|rd|���dz}nd}||z}||z}n\|�d��}|�d��} |dks|| krd} n|||dz�d krd } nd} t | z|z}|S) Nspythonw� �����r<� � rr&s ) � SHEBANG_REr��end�lower�SHEBANG_PYTHONW�SHEBANG_PYTHON�SHEBANG_DETAIL_RE�groups�find) rN�datar0r��shebang�data_after_shebang�shebang_python�args�cr�lf�terms r:�process_shebangzWheel.process_shebangs#�� � � �T� "� "�� � 0��%�%�'�'�C�*.�t��t�*�d�3�4�4�j�'�G��W�]�]�_�_�,�,�!0���!/��!�'�'��0�0�A�� ��a�h�h�j�j��n�,�����$�t�+�G��/�/�D�D����5�!�!�B����5�!�!�B��A�v�v��b��������2��6� �?�g�-�-�"�D�D� �D�!�D�(�4�/�D�� r<c�8�|�|j} tt|��}n #t$rt d|z���wxYw||�����}t j|���d��� d��}||fS)NzUnsupported hash algorithm: %r�=�ascii) � hash_kind�getattr�hashlib�AttributeErrorr�digest�base64�urlsafe_b64encode�rstrip�decode)rNr�r��hasherr]s r:�get_hashzWheel.get_hash%s��� � ���I� Q��W�i�0�0�F�F��� Q� Q� Q�"�#C�i�#O�P�P� P� Q���������$�$�&�&���)�&�1�1�8�8��>�>�E�E�g�N�N���&� � s�!�>c�4�t|��}ttj�||����}|�|ddf��t |��5}|D]}|�|��� ddd��dS#1swxYwYdS)Nr4)�list�to_posixrFr\�relpathr7r�writerow)rN�records� record_path�base�p�writer�rows r:� write_recordzWheel.write_record0s����w�-�-�� �R�W�_�_�[�$�7�7� 8� 8������2�r�{�#�#�#� �{� #� #� %�v�� %� %������$�$�$�$� %� %� %� %� %� %� %� %� %� %� %� %� %���� %� %� %� %� %� %s�$B � B�Bc�d�g}|\}}tt|j��}|D]�\}} t| d��5} | ���} ddd��n #1swxYwYd|�| ��z} t j�| ��} |� || | f����t j� |d��} |� || |��tt j� |d����}|� || f��dS)N�rbz%s=%s�RECORD) r�r�r�r��readr�rFr\�getsizer7r8r�r�)rNr��libdir� archive_pathsr��distinfor�r��apr��fr�r��sizes r:� write_recordszWheel.write_records8sO����!���(���$�.�1�1��"� /� /�E�B���a���� �!��v�v�x�x�� � � � � � � � � � � ���� � � � ��t�}�}�T�2�2�2�F��7�?�?�1�%�%�D� �N�N�B���-� .� .� .� .� �G�L�L��8� ,� ,�� ���'�1�f�-�-�-� �b�g�l�l�8�X�6�6� 7� 7�����b�!�W�%�%�%�%�%s�A�A �!A c���t|dtj��5}|D]7\}}t�d||��|�||���8 ddd��dS#1swxYwYdS)N�wzWrote %s to %s in wheel)r �zipfile� ZIP_DEFLATED�logger�debug�write)rNrRr�r�r�r�s r:� build_zipzWheel.build_zipHs��� �X�s�G�$8� 9� 9� �R�&� � ���A�� � �6��2�>�>�>�����B����� � � � � � � � � � � � � ���� � � � � � s�;A%�%A)�,A)c �� ��|�i}tt�fd�d����d}|dkrd}tg}tg}tg}nd}t g}dg}d g}|�d |��|_|�d |��|_|�d |��|_ �|} |j �d |j ��} d| z} d| z} g} dD�]�}|�vr��|}tj �|���r_tj|��D�]I\}}}|D�]>}t!tj �||����}tj �||��}t'tj �| ||����}| �||f��|dkr�|�d��s�t-|d��5}|���}ddd��n #1swxYwY|�|��}t-|d��5}|�|��ddd��n #1swxYwY��@��K���| }d}tj|��D�]\}}}||krjt5|��D]N\}}t!|��}|�d��r%tj �||��}||=n�O|s Jd���|D]�}t!|���d��r�%tj �||��}t'tj �||����}| �||f������tj|��}|D]w}|dvrqt!tj �||����}t'tj �| |����}| �||f���xd|p|jzdt:zd|zg}|jD]$\}}}|�d|�d |�d |�����%tj �|d��}t-|d��5}|�d�|����ddd��n #1swxYwYt'tj �| d����}| �||f��d �} t?| | �!��} |� || f| | ��tj �|j!|j"��}!|�#|!| ��|!S)"z� Build a wheel from files in specified paths, and use any specified tags when determining the name of the wheel. Nc� ��|�vSr?r@)rB�pathss �r:rCzWheel.build..Vs ���q�E�z�r<)�purelib�platlibrr�false�truerqrrr}r~rr(�%s.datar�)r��headers�scriptsr �.exer��wb� .dist-infoz(.dist-info directory expected, not found)z.pycz.pyo)r�� INSTALLER�SHAREDr�zWheel-Version: %d.%dzGenerator: distlib %szRoot-Is-Purelib: %szTag: r�r�� c�V�|d}|�d��}d|vr|dz }||fS)Nrr=r i')�count)�tr��ns r:�sorterzWheel.build..sorter�s7���1��B����� � �A��r�!�!��U� ���r�7�Nr<)�key)$r�r �IMPVER�ABI�ARCHr|�getr}r~rr�r�rFr\�isdir�walkr r8r�r�r7�endswithr�r�r�r�� enumerate�listdir� wheel_versionrr��sortedr�r�r�r)"rNrr�r �libkey�is_pure� default_pyver� default_abi� default_archr�r��data_dirr�r�rr\�root�dirs�filesr�r��rpr�r�r�r�r��dnr�r}r~rrrRs" ` r:�buildz Wheel.buildNs'��� �<��D��f�1�1�1�1�3I�J�J�K�K�A�N�� �Y� � ��G�#�H�M��%�K� �6�L�L��G�"�G�M�!�(�K�!�7�L��X�X�g�}�5�5�� ��8�8�E�;�/�/����H�H�V�\�2�2�� ��v���"�i�i�i����6���x�'��!�H�,��� �2� .� .�C��%������:�D��w�}�}�T�"�"� .�)+����� .� .�%�D�$��#� .� .��$�R�W�\�\�$��%;�%;�<�<���W�_�_�Q��5�5��%�b�g�l�l�8�S�"�&E�&E�F�F��%�,�,�b�!�W�5�5�5��)�+�+�A�J�J�v�4F�4F�+�!%�a����0�!�'(�v�v�x�x��0�0�0�0�0�0�0�0�0�0�0����0�0�0�0�#'�#7�#7��#=�#=�D�!%�a����.�!� !���� � � �.�.�.�.�.�.�.�.�.�.�.����.�.�.�.�� .������!#����� .� .� �D�$���t�|�|�'�t�_�_���E�A�r�!�"���B��{�{�<�0�0��#%�7�<�<��b�#9�#9�� ��G���� �K�K�!K�K�K�x�� .� .���B�<�<�(�(�)9�:�:����G�L�L��r�*�*���b�g�o�o�a��6�6�7�7���$�$�b�!�W�-�-�-�-�  .�� �8�$�$��� .� .�B��C�C�C��R�W�\�\�(�B�7�7�8�8���b�g�l�l�8�R�8�8�9�9���$�$�b�!�W�-�-�-�� #�m�&I�t�7I� J� #�k� 1� !�G� +� �� !%� � H� H� �E�3�� � !� !� !�U�U�U�C�C�C���"F� G� G� G� G� �G�L�L��7� +� +�� �!�S�\�\� /�Q� �G�G�D�I�I�n�-�-� .� .� .� /� /� /� /� /� /� /� /� /� /� /���� /� /� /� /� �b�g�l�l�8�W�5�5� 6� 6�����b�!�W�%�%�%�  � � � �}�&�9�9�9� � ���H�h�/���G�G�G��7�<�<�� �d�m�<�<�� ���x��/�/�/��s6�"H �H � H �3I �I �I �)R<�<S�Sc�,�|�d��S)zl Determine whether an archive entry should be skipped when verifying or installing. )r=z /RECORD.jws)r)rN�arcnames r:� skip_entryzWheel.skip_entry�s����� 4�5�5�5r<c ��|j}|�d��}|�dd��}|�dd��}tj�|j|j��}|j�d|j��} d| z} d| z} tj| t��} tj| d��} tj| d ��}tj d ��}t|d ��5}|�| ��5}||��}t|��}d d d ��n #1swxYwY|d �dd��}t#d�|D����}||jkr|r||j|��|ddkr |d}n|d}i}|�|��5}t'|���5}|D]}|d}|||<� d d d ��n #1swxYwYd d d ��n #1swxYwYtj| d��}tj| d��}tj| dd��}t)|���}d|_t,j } g}!t1j��}"|"|_d |_ |���D�]�}#|#j}$t;|$t<��r|$}%n|$�d ��}%|� |%��r�M||%}|dr0tC|#j"��|dkrtGd|%z���|dr�|d�dd��\}&}'|�|$��5}|�$��}(d d d ��n #1swxYwY|�%|(|&��\})}*|*|'krtGd|$z���|r4|%�&||f��rtN�(d|%����\|%�&|��o|%�)d �� }+|%�&|��rN|%�d!d��\})},}-tj�||,tU|-����}.n5|%| |fvr���tj�|tU|%����}.|+�su|�|$��5}|�+||.��d d d ��n #1swxYwYtjd"kr tj,|.|#j-d#z d$z��|!�.|.��|sv|drnt|.d%��5}|�$��}(|�%|(|&��\})}/|/|*krtGd&|.z��� d d d ��n #1swxYwY| rq|.�)d'��r\ |�/|.|�(��}0|!�.|0����h#t`$r tN�1d)d�*��Y���wxYw���tj�2tU|$����}1tj�|"|1��}2|�|$��5}|�+||2��d d d ��n #1swxYwYtj�|.��\}3}1|3|_|�3|1��}4|�4|4��|!�5|4�����|rtN�(d+��d }5�n[d }6|j6d }|d,kr�tj| d-��}7 |�|7��5}to|��}8d d d ��n #1swxYwYi}6d.D]t}9d/|9z}:|:|8vriix|6d0|9z<};|8|:�8��D]D}<||6�d9i��}?|>s|?r�|�dd��}@tj�>|@��std:���|@|_|>�@��D]6\}:}<|:�d;|<��}A|�3|A��}4|�4|4���7|?rPd|��|5t�jF|"��cd d d ��S#t`$r0tN�Gd?��|�H���wxYw#t�jF|"��wxYw#1swxYwYd S)@a~ Install a wheel to the specified paths. If kwarg ``warner`` is specified, it should be a callable, which will be called with two tuples indicating the wheel version of this software and the wheel version in the file, if there is a discrepancy in the versions. This can be used to issue any warnings to raise any exceptions. If kwarg ``lib_only`` is True, only the purelib/platlib files are installed, and the headers, scripts, data and dist-info metadata are not written. If kwarg ``bytecode_hashed_invalidation`` is True, written bytecode will try to use file-hash based invalidation (PEP-552) on supported interpreter versions (CPython 2.7+). The return value is a :class:`InstalledDistribution` instance unless ``options.lib_only`` is True, in which case the return value is ``None``. �warner�lib_onlyF�bytecode_hashed_invalidationr(rr�r�r�r�r�Nr�r*rc�,�g|]}t|����Sr@r�r�s r:r�z!Wheel.install..�r�r<zRoot-Is-Purelibrrr��streamrr4r )�dry_runTr&�size mismatch for %s�=�digest mismatch for %szlib_only: skipping %sr r=�posix�i�r�zdigest mismatch on write for %sz.py)�hashed_invalidationzByte-compilation failed)�exc_infozlib_only: returning Nonez1.0zentry_points.txt)�console�guiz %s_scriptszwrap_%s�:z [%s]�,zAUnable to read legacy script metadata, so cannot generate scriptsrSzpython.commandsz8Unable to read JSON metadata, so cannot generate scripts� wrap_console�wrap_guizValid script path not specifiedz = rA�lib�prefixzinstallation failed.)Ir8rrFr\r8r�r�r�r�r�rr�r�r r�rr�r�r rr�recordr`�dont_write_bytecode�tempfile�mkdtemp� source_dir� target_dir�infolist� isinstancer r�r0�str� file_sizerr�r�� startswithr�r�rr� copy_stream�chmod� external_attrr7� byte_compile� Exception�warning�basename�make�set_executable_mode�extendr�r�valuesrG�suffix�flags�json�loadrr��itemsr r��write_shared_locations�write_installed_files�shutil�rmtree� exception�rollback)CrNr�maker�kwargsr8r2r3�bc_hashed_invalidationrRr�r'r�� metadata_name�wheel_metadata_name� record_namer�r��bwfr�r�r�r�r�r�r��readerr�r��data_pfx�info_pfx� script_pfx�fileop�bc�outfiles�workdir�zinfor/� u_arcname�kind�valuer�r)r�� is_script�wherer+�outfile� newdigest�pycr��worknamer,� filenames�dist�commands�ep�epdatarrWr.rX�s�console_scripts� gui_scripts� script_dir�script�optionssC r:�installz Wheel.install�s���"�-�����H�%�%���:�:�j�%�0�0��!'���,J�E�!R�!R���7�<�<�� �d�m�<�<��"�i�i�i����6���x�'��!�H�,��!��x�1I�J�J� �'�n�X�w�?�?���n�X�x�8�8� ��"�7�+�+�� �X�s� #� #�J '�r����,�-�-� 0���W�S�\�\��+�B�/�/�� 0� 0� 0� 0� 0� 0� 0� 0� 0� 0� 0���� 0� 0� 0� 0���)�/�/��Q�7�7�B� �!5�!5�"�!5�!5�!5�6�6�L��� 2�2�2��2���t�)�<�8�8�8��(�)�V�3�3��y�)����y�)���G�����%�%� )���b�)�)�)�)�V�%�)�)����F��%(��� � �)�)�)�)�)�)�)�)�)�)�)�)����)�)�)�)� )� )� )� )� )� )� )� )� )� )� )���� )� )� )� )� !�~�h��3�3�H� �~�h��3�3�H�"���)�R�@�@�J�"�'�2�2�2�F� �F�M��,�,�B��H��&�(�(�G� '�E� �#�E� �a '��[�[�]�]�K3�K3�E�#�n�G�!�'�9�5�5�<�$+� � �$+�N�N�7�$;�$;� ����y�1�1�!� �!�)�,�C��1�v�A�#�e�o�"6�"6�#�a�&�"@�"@�.�04�6?�0@�A�A�A��1�v�C�&)�!�f�l�l�3��&:�&:� ��e��W�W�W�-�-�-��#%�7�7�9�9�D�-�-�-�-�-�-�-�-�-�-�-����-�-�-�-�$(�M�M�$��$=�$=� ��6�!�U�?�?�"2�48�:A�4B�#C�#C�C� �!�I�$8�$8�(�H�9M�$N�$N�!�� � �%<�i�H�H�H� �!*�!5�!5�j�!A�!A�"D�)2�);�);�F�)C�)C�%C��!�+�+�H�5�5�P�'0���s�A�'>�'>� ��5�"�"$�'�,�,�u�U�|�\�"�=M�=M�"N�"N���%�)<�k�(J�J�J�$�"$�'�,�,�v�|�I�7N�7N�"O�"O��$�(3��W�W�W�-�-�<��"�.�.�r�7�;�;�;�<�<�<�<�<�<�<�<�<�<�<����<�<�<�<� �7�g�-�-��H�W�u�/B�b�/H�E�.Q�R�R�R� ����0�0�0�&�K�3�q�6�K�!%�g�t�!4�!4�K��')�w�w�y�y��/3�}�}�T�4�/H�/H� ��9�#,��#6�#6�*:�<@�BI��'�"2�"2�5�"9�"9� >�>�&,�&9�&9�'�Nd�':�'f�'f�� (���� 4� 4� 4� 4��#,�>�>�>�!'���/H�8<�!/�!>�!>�!>�!>�!>�>�����  �W�-�-�l�7�.C�.C�D�D��#%�7�<�<���#<�#<���W�W�W�-�-�=��"�.�.�r�8�<�<�<�=�=�=�=�=�=�=�=�=�=�=����=�=�=�=�"$����w�!7�!7���B�+-��(�$)�J�J�r�N�N� ��2�2�9�=�=�=� ��� �2�2�2�2��L8��L�L�!;�<�<�<��D�D� $�H�#'�9�_�#=�L�#�u�,�,�&�^�H�6H�I�I��6�!#������;��)5�c�):�):��;�;�;�;�;�;�;�;�;�;�;����;�;�;�;�')�H�'9�6�6��$0�3�$6��#$��;�;�DF�$F�H�Y��_�$=��-3�A�Y�-=�-=�-?�-?�%6�%6��78�x�x�x����,J��+,�7�)M�,-��3�8�8�A�G�;L�;L�1L�,L�A�45��!�&� � ��6�� )�6�6�6�"�N�N�,5�6�6�6�6�6�6���� F�!#����!7�!7�O�3�%,�W�S�\�\��+/�9�R�=�=�+<�+<�\�+J�+J��#+�!O�/7�|�|��&0�2=�'>�'>�!>�/9�E�,�(7�(=�(=�(?�(?�F�F���1�67�a�a���);��,1�J�J�v�,>�,>� � &� :� :�9� E� E� E� E�*�J�+0�$�.��,7�,=�,=�,?�,?�!J�!J�D�A�q�:;�!�!�Q�Q�-?�F�05� � �6�7�0K�0K�I�$*�$>�$>�y�$I�$I�$I�$I��� � �V�X�6�6�A�0��3�3�D�!��K�K�E��i�(��i�(�#)�E�%�L��3�3�E�7�C�C�A��+� ����*�*�*��.�.�x��x��/6�8�8�8�� � �g�&�&�&�UJ '�J '�J '�J '�J '�J '�J '�J '��J� � � �� � �!7�8�8�8����!�!�!�� ����� � �g�&�&�&�&����UJ '�J '�J '�J '����J '�J '�J '�J '�J '�J 's��6l7� D3�' l7�3D7 �7l7�:D7 �;B l7�H �G6�* H �6G: �:H �=G: �>H � l7� H �l7�H �B l7� Ck!�=N� k!�N" �"k!�%N" �&Ek!�+T� k!�T �k!�T �A"k!�8AW �? k!� W �k!�W �k!�.,X�k!�&Y�k!�Y�A&k!�,[� k!�[ �k!�[ �B7k!�a�$_�4 a�_ �a�_ �Al;c���t�^tj�t ��t d��dt jdd�z��}t|��atS)Nz dylib-cachez%s.%sr&) �cacherFr\r8rrPr`� version_infor)rNr�s r:�_get_dylib_cachezWheel._get_dylib_cache�sT�� �=��7�<�<�� 0� 0�#�m�2D�2D� '�#�*:�2�A�2�*>� >�@�@�D��$�K�K�E�� r<c ���tj�|j|j��}|j�d|j��}d|z}tj|d��}tj d��}g}t|d��5} |� |��5}||��} tj | ��} |���} | �|��} tj�| j| ��} tj�| ��stj| ��| ���D]�\}}tj�| t)|����}tj�|��sd}nftj|��j}t0j�|��}|�|��}t1j|j�}||k}|r|�|| ��|�||f���� ddd��n #1swxYwYn#t<$rYnwxYwddd��n #1swxYwY|S)Nr(r�� EXTENSIONSr�r�T)rFr\r8r�r�r�r�r�r�r�r r�r`rar�� prefix_to_dirr�r�makedirsrbrr��stat�st_mtime�datetime� fromtimestamp�getinfo� date_time�extractr7r�)rNrRr�r�r/r�r]r�r�r�rSr�rG� cache_baser�r��destr�� file_timer�� wheel_times r:�_get_extensionszWheel._get_extensions�s����7�<�<�� �d�m�<�<��"�i�i�i����6��!�H�,���.��<�8�8���"�7�+�+���� �X�s� #� #� �r� ��W�W�W�%�%�4�� �����B�!%��2���J� �1�1�3�3�E�"�0�0��:�:�F�!#����e�j�&�!A�!A�J��7�=�=��4�4�0�� �J�/�/�/�)3�)9�)9�);�);� 4� 4� ��g�!�w�|�|�J� �W�8M�8M�N�N��!�w�~�~�d�3�3�=�&*�G�G�(*��� � �(>�I�(0�(9�(G�(G� �(R�(R�I�#%�:�:�g�#6�#6�D�)1�):�D�N�)K�J�&0�9�&<�G�"�<��J�J�w� �;�;�;�� � �t�T�l�3�3�3�3� 4�4�4�4�4�4�4�4�4�4�4�4����4�4�4�4���*� � � ��� ����/ � � � � � � � � � � ���� � � � �2� s[�<I'�>I �FH?�3 I �?I �I �I �I � I'� I�I'�I�I'�'I+�.I+c� �t|��S)zM Determine if a wheel is compatible with the running system. )� is_compatiblerMs r:r�zWheel.is_compatible�s���T�"�"�"r<c��dS)zP Determine if a wheel is asserted as mountable by its metadata. Tr@rMs r:� is_mountablezWheel.is_mountable�s ���tr<c���tj�tj�|j|j����}|���sd|z}t|���|���sd|z}t|���|tjvrt� d|��dS|r tj� |��n tj� d|��|���}|rTttjvr$tj� t��t�||��dSdS)Nz)Wheel %s not compatible with this Python.z$Wheel %s is marked as not mountable.z%s already in pathr)rFr\r�r8r�r�r�rr�r`r�r�r7�insertr��_hook� meta_pathrT)rNr7rR�msgrSs r:�mountz Wheel.mount�s>���7�?�?�2�7�<�<�� �d�m�#L�#L�M�M���!�!�#�#� (�=��H�C�"�3�'�'� '�� � �"�"� (�8�8�C�C�"�3�'�'� '� �s�x� � � �L�L�-�x� 8� 8� 8� 8� 8�� -������)�)�)�)������8�,�,�,��-�-�/�/�J�� 0��� �-�-��M�(�(��/�/�/�� � �(�J�/�/�/�/�/� 0� 0r<c��tj�tj�|j|j����}|t jvrt�d|��dSt j� |��|tj vrt� |��tj s9tt j vr(t j � t��dSdSdS)Nz%s not in path) rFr\r�r8r�r�r`r�r�rYr�rKr�)rNrRs r:�unmountz Wheel.unmount s����7�?�?�2�7�<�<�� �d�m�#L�#L�M�M�� �3�8� #� #� �L�L�)�8� 4� 4� 4� 4� 4� �H�O�O�H� %� %� %��5�.�.�.�� � �X�&�&�&��&� 0��C�M�)�)��M�(�(��/�/�/�/�/� 0� 0�)�)r<c�.�tj�|j|j��}|j�d|j��}d|z}d|z}tj|t��}tj|d��}tj|d��}tj d��}t|d��5} | � |��5} || ��} t| ��} ddd��n #1swxYwY| d�d d ��} td �| D����}i}| � |��5}t!|� ��5}|D]}|d }|||<� ddd��n #1swxYwYddd��n #1swxYwY| ���D�]Q}|j}t%|t&��r|}n|�d��}|�d��}d|vrt+d|z���|�|��r�x||}|dr0t/|j��|dkrt+d|z���|d r�|d �dd ��\}}| � |��5}|���}ddd��n #1swxYwY|�||��\}}||krt+d|z�����S ddd��dS#1swxYwYdS)Nr(rr�r�r�r�r�r�r*rc�,�g|]}t|����Sr@r�r�s r:r�z Wheel.verify..(r�r<r6rr=�..�invalid entry in wheel: %rr&r9r:r;)rFr\r8r�r�r�r�r�rr�r�r r�rr�r�rrNrOr r�rr0rPrQr�r�)rNrRr�r'r�rlrmrnr�r�ror�r�r�r�r�r�rpr�r�rxr/ryrzr{r�r)r�s r:r�z Wheel.verifysr���7�<�<�� �d�m�<�<��"�i�i�i����6���x�'��!�H�,��!��x�1I�J�J� �'�n�X�w�?�?���n�X�x�8�8� ��"�7�+�+�� �X�s� #� #�* ?�r����,�-�-� 0���W�S�\�\��+�B�/�/�� 0� 0� 0� 0� 0� 0� 0� 0� 0� 0� 0���� 0� 0� 0� 0���)�/�/��Q�7�7�B� �!5�!5�"�!5�!5�!5�6�6�L��G�����%�%� )���b�)�)�)�)�V�%�)�)����F��%(��� � �)�)�)�)�)�)�)�)�)�)�)�)����)�)�)�)� )� )� )� )� )� )� )� )� )� )� )���� )� )� )� )� ����� ?� ?���.���g�y�1�1�8� '�I�I� '���w� 7� 7�I��O�O�C�(�(���1�9�9�*�,7�9B�,C�D�D�D��?�?�9�-�-����i�(���q�6�=�c�%�/�2�2�c�!�f�<�<�*�,0�2;�,<�=�=�=��q�6�?�"%�a�&�,�,�s�A�"6�"6�K�D�%�����)�)�)�R�!�w�w�y�y��)�)�)�)�)�)�)�)�)�)�)����)�)�)�)� $� � �d�D� 9� 9�I�A�v�����.�04�6=�0>�?�?�?��5 ?�* ?�* ?�* ?�* ?�* ?�* ?�* ?�* ?�* ?�* ?�* ?�* ?����* ?�* ?�* ?�* ?�* ?�* ?s��.L �C+� L �+C/ �/L �2C/ �3AL �F �E3�' F �3E7 �7F �:E7 �;F �> L � F �L �F �D L �J>�2 L �>K �L �K �6L � L�Lc �Z�d�}d�}tj�|j|j��}|j�d|j��}d|z}tj|d��} t��5} t|d��5} i} | � ��D]�} | j}t|t��r|}n|� d��}|| kr�=d|vrtd |z���| �| | ��tj�| t!|����}|| |<�� d d d ��n #1swxYwY|| |��\}}|| fi|��}|�r3|| |��\}}|r||kr |||��|�/t#jd d | � ��\}}tj|��nVtj�|��std|z���tj�||j��}t+| �����}tj�| |��}||f}|�|| |��|�||��|�t3j||��d d d ��n #1swxYwY|S)a� Update the contents of a wheel in a generic way. The modifier should be a callable which expects a dictionary argument: its keys are archive-entry paths, and its values are absolute filesystem paths where the contents the corresponding archive entries can be found. The modifier is free to change the contents of the files pointed to, add new entries and remove entries, before returning. This method will extract the entire contents of the wheel to a temporary location, call the modifier, and then use the passed (and possibly updated) dictionary to write a new wheel. If ``dest_dir`` is specified, the new wheel is written there -- otherwise, the original wheel is overwritten. The modifier should return True if it updated the wheel, else False. This method returns the same value the modifier returns. c�~�dx}}|�dt��}||vrd|z}||vr||}t|���j}||fS)Nr=z %s/PKG-INFO�r\)rrr�)�path_mapr�r�r\rs r:� get_versionz!Wheel.update..get_version`sb��!� !�G�d�%�X�X�'?�'?�@�C��(�"�"�#�h�.���h�����}��"��-�-�-�5���D�=� r<c�`�d} t|��}|�d��}|dkrd|z}nfd�||dzd��d��D��}|dxxdz cc<|d|��dd�d �|D������}n+#t$rt �d |��YnwxYw|rft|� ��}||_|� t��}|� ||� ��t �d ||��dSdS)Nr(rz%s+1c�,�g|]}t|����Sr@r�)r�r�s r:r�z8Wheel.update..update_version..rs��H�H�H��S��V�V�H�H�Hr<rr*r��+c3�4K�|]}t|��V��dSr?)rPr�s r:� z7Wheel.update..update_version..us(����1H�1H�Q�#�a�&�&�1H�1H�1H�1H�1H�1Hr<z0Cannot update non-compliant (PEP-440) version %rr�)r\�legacyzVersion updated from %r to %r) rr�r�r8rr�r�rr�rrr�)r�r\�updatedrXr�r9�mdr�s r:�update_versionz$Wheel.update..update_versionjsx���G� 4�%�g�.�.���L�L��%�%���q�5�5�$�w�.�G�G�H�H�W�Q��U�V�V�_�-B�-B�3�-G�-G�H�H�H�E��"�I�I�I��N�I�I�I�)0��!�����),���1H�1H�%�1H�1H�1H�)H�)H�)H�J�G���*� 4� 4� 4�� � �*�+2�4�4�4�4�4� 4����� &��4�(�(�(��$�� ����'?�@�@�����d�6��2�2�2�� � �<�g�$�&�&�&�&�&�  &� &s�BB�%C�Cr(r�r�r�r�r�r�Nr�z wheel-update-)r^rG�dirzNot a directory: %r)rFr\r8r�r�r�r�r�rr rNrOr r�rr�rrJ�mkstemp�closerr�rbr�rre�copyfile)rN�modifier�dest_dirrjr�r�rRr�r�rnrwr�r�rxr/ryr\�original_versionr)�modified�current_version�fd�newpathr�r�r�s r:rQz Wheel.updateOsi��" !� !� !� &� &� &�.�7�<�<�� �d�m�<�<��"�i�i�i����6��!�H�,���n�X�x�8�8� � �Y�Y�, 7�'���3�'�'� /�2����[�[�]�]� /� /�E�#�n�G�!�'�9�5�5�<�$+� � �$+�N�N�7�$;�$;� � �K�/�/� ��y�(�(�.�0;�=F�0G�H�H�H��J�J�u�g�.�.�.��7�<�<���i�1H�1H�I�I�D�*.�H�Y�'�'� /� /� /� /� /� /� /� /� /� /� /� /���� /� /� /� /�$#.�+�h��"A�"A� � �a��x��3�3�F�3�3�H�� 7�(3� �H�h�(G�(G�%���"�:��;K�(K�(K�"�N�?�D�9�9�9��#�"*�"2�&�:I�7>�#@�#@�#@�K�B���H�R�L�L�L�L��7�=�=��2�2�Q�.�/D�x�/O�P�P�P� �g�l�l�8�T�]�C�C�G� $�X�^�^�%5�%5� 6� 6� ��7�<�<���:�:����)���"�"�4��-�@�@�@����w� �6�6�6��#��O�G�X�6�6�6�Y, 7�, 7�, 7�, 7�, 7�, 7�, 7�, 7�, 7�, 7�, 7����, 7�, 7�, 7�, 7�Z�s8�*J �;B3D;�/ J �;D? �?J �D? �EJ � J$�'J$)NFFr?)NN)F)rjrkrl�__doc__r r�rO�propertyr�r�r�rr�r�r�r�r�r�r�rr-r0r�r�r�r�r�r�r�r�rQr@r<r:rnrn�s����������M��I�'2�'2�'2�'2�R�;�;��X�;� �$�$��X�$��+�+��X�+� ����_��>�������_�� ���< !� !� !� !�%�%�%�&�&�&�  � � � r�r�r�r�h6�6�6� k'�k'�k'�Z��� � � �D#�#�#� ��� 0�0�0�0�* 0� 0� 0�6?�6?�6?�pc�c�c�c�c�cr<rnc��ddl}|���}g}|ddkre|d�d��D]:}|�|���rt |��nd���;t |��}|S)Nr�glibcrr*)�platform�libc_verr�r7�isdigitr�r�)r��verr]r�s r:�_get_glibc_versionr��s����O�O�O� � � � � �C� �F� �1�v�����Q����c�"�"� 8� 8�A� �M�M�A�I�I�K�K�6�#�a�&�&�&�Q� 7� 7� 7� 7��v���� �Mr<c � �tg}td}ttjddz dd��D]9}|�d�|t |��g�����:g}tj��D]J\}}}|� d��r/|�|� dd��d���K|� ��tdkr|� dt��|�d��g}tg}tjd k�rt!jd t��}|r�|���\} }}} t'|��}| g} | d vr| �d ��| d vr| �d��| dvr| �d��| dvr| �d��| dvr| �d��|dkr=| D]/} | �d|�d|�d| ��} | tkr|�| ���0|dz}|dk�=|D�]�}|D�]�} |�d�t(|df��|| f��|dk�rhtj� d���rH| �dd��} t-��}t/|��dk�r|dkr;|�d�t(|df��|d| zf��|dkr;|�d�t(|df��|d| zf��|dkr;|�d�t(|df��|d| zf��|�d�t(|df��|d|d�d|d�d| ��f��������t1|��D]u\}}|�d�t(|f��ddf��|dkr8|�d�t(|df��ddf���vt1|��D]k\}}|�d�d |f��ddf��|dkr3|�d�d |df��ddf���lt3|��S)!zG Return (pyver, abi, arch) tuples compatible with this Python. rrr�r4z.abir*r&rq�darwinz(\w+)_(\d+)_(\d+)_(\w+)$)�i386�ppc�fat)r�r��x86_64�fat3)�ppc64r��fat64)r�r��intel)r�r�r�r�r�� universalr)�linux�linux_)r&�z manylinux1_%s)r&� zmanylinux2010_%s)r&�zmanylinux2014_%s� manylinux_rrr')r5�ranger`r�r7r8rPrc� get_suffixesrRr��sortrr�rr��rer�r�r�� IMP_PREFIXrEr�rgr�set)�versions�major�minor�abisr^r)r]�archesr0r�r�matchesr�r�r~r9r�r�s r:�compatible_tagsr��s?���|�H� �q�M�E��s�'��*�Q�.��R�8�8�6�6����������E� � � 3�4�4�5�5�5�5� �D��(�*�*�1�1� ���1� � � �V� $� $� 1� �K�K�� � �S�!�,�,�Q�/� 0� 0� 0���I�I�K�K�K� �f�}�}� � � �A�s�����K�K����� �F��V�F� �|�x��� �H�0�$� 7� 7�� � �'(�x�x�z�z� $�D�%�����J�J�E��f�G���&�&����u�%�%�%��0�0�0����v�&�&�&��*�*�*����w�'�'�'��)�)�)����w�'�'�'��B�B�B����{�+�+�+��1�*�*�$�)�)�E�)-���u�u�u�e�e�e�U�U�C�A��D�y�y�� � �a�(�(�(���� �� �1�*�*��C�C��� C� C�D� �M�M�2�7�7�J��� �#<�=�=�s�D�I� J� J� J��f�}�}���!8�!8��!A�!A�}��|�|�H�b�1�1��*�,�,���u�:�:��?�?������ � �r�w�w� �H�Q�K�/H�'I�'I�3�'6��'=�'?�@�@�@���'�'�� � �r�w�w� �H�Q�K�/H�'I�'I�3�'9�D�'@�'B�C�C�C���'�'�� � �r�w�w� �H�Q�K�/H�'I�'I�3�'9�D�'@�'B�C�C�C��M�M�2�7�7�J��� �+D�#E�#E�s�s�;@��8�8�8�U�1�X�X�X�;?�4�$A�#B�C�C�C��! C�* ��)�)�N�N� ��7�� � �r�w�w� �G�4�5�5�v�u�E�F�F�F� ��6�6� �M�M�2�7�7�J��� �#;�<�<�f�e�L� M� M� M�� ��)�)�H�H� ��7�� � �r�w�w��g��/�/���?�@�@�@� ��6�6� �M�M�2�7�7�D�'�!�*�#5�6�6���F� G� G� G�� �v�;�;�r<c��t|t��st|��}d}|�t}|D]%\}}}||jvr||jvr ||jvrd}n�&|S)NFT)rOrn�COMPATIBLE_TAGSr}r~r)�wheelr�r]r�r~rs r:r�r�sx�� �e�U� #� #���e� � �� �F� �|��������S�$� �%�+� � �#���"2�"2�t�u�z�7I�7I��F� �E�� �Mr<r?)U� __future__rr�r�r��emailrr�rcr`�loggingrFr�r�rer`rJr�r4rr�compatrr r r r �databaser r�rrrr�utilrrrrrrrrrrr�rr� getLoggerrjr�r��hasattrr�r�rRr6r5r�r|rrErrr�r;�compile� IGNORECASE�VERBOSEr�r�r�r�r�r�rGr��objectrIr�rnr�r�r�r�r@r<r:�rsv��(�'�'�'�'�'� � � � � � � � �����#�#�#�#�#�#����� � � � � � � � ����� � � � ����� � � � � � � � � � � � ���������+�+�+�+�+�+�+�+�C�C�C�C�C�C�C�C�C�C�C�C�C�C�+�+�+�+�+�+�1�1�1�1�1�1�1�1�1�1�1�1�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�!�@�?�?�?�?�?�?�?� �� �8� $� $�� �� �7�3�#�$�$���J�J��\���V�$�$���J�J��\�U����J�J��J� %�Y� %�&8� 9� 9� ��/��#�*�2�A�2�.�.�J� �z��� �j� ���|�~�~���c�3�'�'�/�/��S�9�9���i��w�'�'��� �3�>�>�*� %� %� � �+�+�j�$� '� '� -� -�c� 2� 2�1� 5�C�C���� �+�-�-�C���b�j���]�R�Z��!�!� ��"�*���]�R�Z�� !�!�� �R�Z�)� *� *� ��B�J�@�A�A�������6�S�=�=��{�H�H�/�/�H�!�!�!�!�!�f�!�!�!�F �� � ��i �i �i �i �i �F�i �i �i �V���M�M�M�`"�/�#�#��� � � � � � r<