| Server IP : 43.141.49.119 / Your IP : 113.219.202.173 Web Server : Apache System : Linux VM-8-5-opencloudos 6.6.34-9.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 19 19:35:45 CST 2024 x86_64 User : www ( 1000) PHP Version : 8.1.27 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.11/site-packages/setuptools/__pycache__/ |
Upload File : |
�
?�fz � � � d Z ddlZddlmZ ddlmZ ddlmZ ddlm Z ee
ef Z ej dej
� � Z ej d ej
� � Zd
e
de
fd�Zd
e
de
fd�Zde
de
fd�Zde
de
fd�Zde
de
fd�Zde
de
fd�Zde
de
fd�ZdS )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 �^ � t j dd| � � }|� � � 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.11/site-packages/setuptools/_normalization.py�safe_identifierr s4 � � �6�-��d�+�+�D����������K� � componentc �8 � t � d| � � 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
)r s r � safe_namer s � � �!�!�#�y�1�1�1r �versionc �J � | � dd� � } t t j � |� � � � S # t j j $ rJ t � d|� � }t t j � |� � � � cY S w xY w)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�strr r �Version�InvalidVersionr r
)r �v�attempts r �safe_versionr"