AlkantarClanX12

Your IP : 3.145.44.22


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

�

�܋f�	��ddlZddlmZmZmZmZmZddlmZm	Z	ddl
mZmZeedee
effZede��ZGd�d	e��ZGd
�de��Zejd��Zejd
��Zdedefd�Zdd�deeefdedefd�Zdedeeeeeeffd�Zdedeeeffd�ZdS)�N)�	FrozenSet�NewType�Tuple�Union�cast�)�Tag�	parse_tag)�InvalidVersion�Version��NormalizedNamec��eZdZdZdS)�InvalidWheelFilenamezM
    An invalid wheel filename was found, users should refer to PEP 427.
    N��__name__�
__module__�__qualname__�__doc__r
��`/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/packaging/utils.pyrr����������rrc��eZdZdZdS)�InvalidSdistFilenamez^
    An invalid sdist filename was found, users should refer to the packaging user guide.
    Nrr
rrrrrrrz[-_.]+z	(\d+)(.*)�name�returnc��t�d|�����}tt|��S)N�-)�_canonicalize_regex�sub�lowerrr)r�values  r�canonicalize_namer# s3���#�#�C��.�.�4�4�6�6�E����&�&�&rT)�strip_trailing_zero�versionr$c���t|t��r#	t|��}n#t$r|cYSwxYw|}g}|jdkr|�|j�d���d�d�|jD����}|rtj	dd|��}|�|��|j
�7|�d�d�|j
D������|j�|�d	|j����|j�|�d
|j����|j
�|�d|j
����d�|��S)z�
    This is very similar to Version.__str__, but has one subtle difference
    with the way it handles the release segment.
    r�!�.c3�4K�|]}t|��V��dS�N��str��.0�xs  r�	<genexpr>z'canonicalize_version.<locals>.<genexpr>=s(����>�>�!�s�1�v�v�>�>�>�>�>�>rz(\.0)+$�Nc3�4K�|]}t|��V��dSr*r+r-s  rr0z'canonicalize_version.<locals>.<genexpr>Es(����8�8��S��V�V�8�8�8�8�8�8rz.postz.dev�+)�
isinstancer,rr�epoch�append�join�release�rer �pre�post�dev�local)r%r$�parsed�parts�release_segments     r�canonicalize_versionrA&s����'�3����	��W�%�%�F�F���	�	�	��N�N�N�	�������E��|�q���
�����'�'�'�(�(�(��h�h�>�>�v�~�>�>�>�>�>�O��B��&��R��A�A��	�L�L��!�!�!��z��
���R�W�W�8�8�V�Z�8�8�8�8�8�9�9�9��{��
���*�V�[�*�*�+�+�+��z��
���(�F�J�(�(�)�)�)��|��
���'���'�'�(�(�(�
�7�7�5�>�>�s�'�6�6�filenamec��|�d��std|�����|dd�}|�d��}|dvrtd|�����|�d|dz
��}|d}d	|vs t	jd
|tj���td|�����t|��}t|d��}|d
kr�|d}t�|��}|�td|�d|�d����ttt|�
d����|�
d��f��}nd}t|d��}	||||	fS)Nz.whlz3Invalid wheel filename (extension must be '.whl'): ���r)��z0Invalid wheel filename (wrong number of parts): �r�__z^[\w\d._]*$zInvalid project name: rrFzInvalid build number: z in '�'r
���)�endswithr�count�splitr9�match�UNICODEr#r�_build_tag_regexr�BuildTag�int�groupr
)
rB�dashesr?�	name_partrr%�
build_part�build_match�build�tagss
          r�parse_wheel_filenamerZVs������V�$�$�
�"�L�(�L�L�
�
�	
�����}�H�
�^�^�C�
 �
 �F�
�V���"�I�x�I�I�
�
�	
�
�N�N�3���
�+�+�E��a��I��y���B�H�^�Y��
�K�K�S�"�#F�H�#F�#F�G�G�G��Y�'�'�D��e�A�h���G�
��{�{��1�X�
�&�,�,�Z�8�8����&�E��E�E�(�E�E�E���
��X��K�$5�$5�a�$8�$8� 9� 9�;�;L�;L�Q�;O�;O�P�Q�Q������U�2�Y���D��'�5�$�'�'rc�|�|�d��r|dtd���}n@|�d��r|dtd���}ntd|�����|�d��\}}}|std|�����t	|��}t|��}||fS)Nz.tar.gzz.zipz@Invalid sdist filename (extension must be '.tar.gz' or '.zip'): rzInvalid sdist filename: )rK�lenr�
rpartitionr#r)rB�	file_stemrU�sep�version_partrr%s       r�parse_sdist_filenamerazs�������#�#�
��.��I����.�/�	�	�	�	�	�6�	"�	"�
��^��F���|�^�,�	�	�"�
��
�
�
�
�	
�$-�#7�#7��#<�#<� �I�s�L��J�"�#H�h�#H�#H�I�I�I��Y�'�'�D��l�#�#�G��'�?�r)r9�typingrrrrrrYr	r
r%rrrRr,rQr�
ValueErrorrr�compilerrPr#�boolrArZrar
rr�<module>rfs���

�	�	�	�9�9�9�9�9�9�9�9�9�9�9�9�9�9� � � � � � � � �,�,�,�,�,�,�,�,���r��E�#�s�(�O�+�,����)�3�/�/�������:���������:����!�b�j��+�+���2�:�l�+�+��'�C�'�N�'�'�'�'�BF�-�-�-�
�7�C�<�
 �-�:>�-��-�-�-�-�`!(��!(�
�>�7�H�i��n�<�=�!(�!(�!(�!(�H�3��5���1H�+I������r