OwlCyberSecurity - MANAGER
Edit File: wheel.cpython-312.pyc
� ����G��e����������������������������d�Z�ddlZddlmZ�ddlmZ�ddlmZ�ddlm Z m Z �ddlmZ�ddl mZ�d Z�ej ������������������e�������Zd e dedeeef���fd �Zde dedefd�Zde dedefd�Zde dedefd�Zdedeedf���fd�Zdeedf���deddfd�Zy)z0Support functions for working with wheel files. �����N)�Message)�Parser)�Tuple)� BadZipFile�ZipFile)�canonicalize_name)�UnsupportedWheel)����r���� wheel_zip�name�returnc����������� ������������� �t��������|�|�������}t��������|�|�������}t��������|�������}t ��������||��������||fS�#�t��������$�r)}t��������dj ������������������|t��������|����������������������d}~ww�xY�w)z�Extract information from the provided wheel, ensuring it meets basic standards. Returns the name of the .dist-info directory and the parsed WHEEL metadata. z{} has an invalid wheel, {}N)�wheel_dist_info_dir�wheel_metadata� wheel_versionr ����format�str�check_compatibility)r���r����info_dir�metadata�version�es��� ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/wheel.py�parse_wheelr������sr������S�&�y�$�7��!�)�X�6����)������&��X�������S��<�C�C�D�#�a�&�Q�R�R��S�s����#5�� A'�$A"�"A'�sourcec�����������������������|�j��������������������������D��ch�c]��}|j������������������dd�������d������}}|D��cg�c]��}|j������������������d�������s�|���}}|st��������d��������t ��������|�������dkD��r)t��������dj������������������dj ������������������|����������������������|d���}t��������|�������}t��������|�������}|j������������������|�������st��������dj������������������||���������������|S�c�c}w�c�c}w�) z�Returns the name of the contained .dist-info directory. Raises AssertionError or UnsupportedWheel if not found, >1 found, or it doesn't match the provided name. �/r ���r���z .dist-infoz.dist-info directory not foundz)multiple .dist-info directories found: {}z, z2.dist-info directory {!r} does not start with {!r}) �namelist�split�endswithr ����lenr����joinr���� startswith) r���r����p�subdirs�s� info_dirsr���� info_dir_name�canonical_names ��� r���r���r���&���s��������,2�?�?�+<�=�a�q�w�w�s�A��q�!�=�G�=�#�@�q�q�z�z�,�'?��@�I�@���?�@�@� �9�~����7�>�>�t�y�y��?S�T� �� ����|�H�%�h�/�M�&�t�,�N��#�#�N�3��@�G�G��.� � �� ���O��/�>��@s����C�C$�C$�pathc����������������������� �|�j������������������|�������S�#�t��������t��������t��������f$�r}t ��������d|�d|����������d�}~ww�xY�w)Nzcould not read z file: )�readr����KeyError�RuntimeErrorr ���)r���r*���r���s��� r����read_wheel_metadata_filer/���G���sJ������G��{�{�4� � ��� ��,�/��G�������u�E�F�F��G�s������=�8�=� dist_info_dirc�����������������������|��d�}t��������|�|�������} �|j��������������������������}t ����������������j������������������|�������S�#�t��������$�r}t��������d|�d|����������d}~ww�xY�w)ziReturn the WHEEL metadata of an extracted wheel, if possible. Otherwise, raise UnsupportedWheel. z/WHEELzerror decoding z: N)r/����decode�UnicodeDecodeErrorr ���r����parsestr)r���r0���r*����wheel_contents� wheel_textr���s��� r���r���r���P���sq��������_�F�#�D�-�f�d�;�N�B�#�*�*�,� ���8���Z�(�(�� ���B������1�%�@�A�A��B�s����<�� A�A�A� wheel_data.c������������������������|�d���}|�t��������d��������|j��������������������������} �t��������t��������t��������|j������������������d���������������������S�#�t��������$�r�t��������d|����������w�xY�w)zbGiven WHEEL metadata, return the parsed Wheel-Version. Otherwise, raise UnsupportedWheel. z Wheel-VersionzWHEEL is missing Wheel-Version�.zinvalid Wheel-Version: )r ����strip�tuple�map�intr���� ValueError)r7����version_textr���s��� r���r���r���c���ss��������o�.�L����?�@�@�� � �"�G�F��S��g�m�m�C�0�1�2�2����F��!8���D�E�E�F�s����'A��A$r���c����������������������|�d���t���������d���kD��r8t��������dj������������������|dj������������������t ��������t ��������|������������������������������|�t���������kD��r4t��������j������������������ddj������������������t ��������t ��������|�����������������������yy)a���Raises errors or warns if called with an incompatible Wheel-Version. pip should refuse to install a Wheel-Version that's a major series ahead of what it's compatible with (e.g 2.0 > 1.1); and warn when installing a version only minor version ahead (e.g 1.2 > 1.1). version: a 2-tuple representing a Wheel-Version (Major, Minor) name: name of wheel or package to raise exception about :raises UnsupportedWheel: when an incompatible Wheel-Version is given r���zB{}'s Wheel-Version ({}) is not compatible with this version of pipr9���z*Installing from a newer Wheel-Version (%s)N)�VERSION_COMPATIBLEr ���r���r"���r<���r����logger�warning)r���r���s��� r���r���r���s���sv��������q�z�&�q�)�)�� ��V�D�#�(�(�3�s�G�+<�"=�>� �� �� �%� %����8��H�H�S��g�&�'� �� &�����)�__doc__�logging� email.messager����email.parserr����typingr����zipfiler���r����pip._vendor.packaging.utilsr����pip._internal.exceptionsr ���rA���� getLogger�__name__rB���r���r���r����bytesr/���r���r=���r���r�����rD���r����<module>rQ������s����������!������'��9��5����� �� � �8� $���7���#���%��W��2E���$����s���s���BG�W��G�C��G�E��G�)�7��)�3��)�7��)�& F�g�� F�%��S��/�� F� ��s�C�x��� ��� ��� rD���