HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: 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
Upload Files
File: //lib/python3.10/distutils/__pycache__/config.cpython-310.pyc
o

��bc��@s<dZddlZddlmZddlmZdZGdd�de�ZdS)z�distutils.pypirc

Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
�N)�RawConfigParser)�CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c@sheZdZdZdZdZdZdZdddefdgZd	gZ	d
d�Z
dd
�Zdd�Zdd�Z
dd�Zdd�ZdS)�
PyPIRCCommandz;Base command that knows how to handle the .pypirc file
    zhttps://upload.pypi.org/legacy/�pypiNzrepository=�rzurl of repository [default: %s])�
show-responseNz&display full response text from serverrcCstj�tj�d�d�S)zReturns rc file path.�~z.pypirc)�os�path�join�
expanduser��self�r�'/usr/lib/python3.10/distutils/config.py�_get_rc_file&szPyPIRCCommand._get_rc_filecCs^|��}t�t�|tjtjBd�d��}|�t||f�Wd�dS1s(wYdS)zCreates a default .pypirc file.i��wN)rr	�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�frrr�
_store_pypirc*s "�zPyPIRCCommand._store_pypirccCs�|��}tj�|�r�|�d|�|jp|j}t�}|�|�|�	�}d|vr�|�
dd�}dd�|�d�D�}|gkrEd|vrCdg}niS|D]U}d|i}|�
|d	�|d	<d
|jfd|jfdfD]\}	}
|�
||	�rs|�
||	�||	<q`|
||	<q`|dkr�||jdfvr�|j|d
<|S|d|ks�|d
|kr�|SqGiSd
|vr�d
}|�
|d
�r�|�
|d
�}n|j}|�
|d	�|�
|d�|||jd�SiS)zReads the .pypirc file.zUsing PyPI login from %s�	distutilsz
index-serverscSs g|]}|��dkr|���qS)�)�strip)�.0�serverrrr�
<listcomp>=s�z.PyPIRCCommand._read_pypirc.<locals>.<listcomp>�
rr"r�
repository�realm)rNzserver-loginr)rrr%r"r&)rr	r
�exists�announcer%�DEFAULT_REPOSITORYr�read�sections�get�split�
DEFAULT_REALM�
has_option)rrr%�configr+�
index_servers�_serversr"�current�key�defaultrrr�_read_pypirc0sb
���

��

�zPyPIRCCommand._read_pypirccCs8ddl}|�dd�}|�|�d�dd�}|���|�S)z%Read and decode a PyPI HTTP response.rNzcontent-typez
text/plain��charset�ascii)�cgi�	getheader�parse_headerr,r*�decode)r�responser:�content_type�encodingrrr�_read_pypi_responsepsz!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)zInitialize options.Nr)r%r&�
show_responser
rrr�initialize_optionsws
z PyPIRCCommand.initialize_optionscCs,|jdur	|j|_|jdur|j|_dSdS)zFinalizes options.N)r%r)r&r.r
rrr�finalize_options}s


�zPyPIRCCommand.finalize_options)�__name__�
__module__�__qualname__�__doc__r)r.r%r&�user_options�boolean_optionsrrr6rArCrDrrrrrs(���@r)rHr	�configparserr�
distutils.cmdrrrrrrr�<module>s