AlkantarClanX12

Your IP : 3.145.76.159


Current Path : /opt/alt/python37/lib64/python3.7/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/distutils/__pycache__/config.cpython-37.opt-2.pyc

B

YI~d��@s8ddlZddlmZddlmZdZGdd�de�ZdS)�N)�RawConfigParser)�CommandzE[distutils]
index-servers =
    pypi

[pypi]
username:%s
password:%s
c@sdeZdZdZdZdZdZdddefdgZdgZd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�ZdS)�
PyPIRCCommandzhttps://upload.pypi.org/legacy/�pypiNzrepository=�rzurl of repository [default: %s])z
show-responseNz&display full response text from serverz
show-responsecCstj�tj�d�d�S)N�~z.pypirc)�os�path�join�
expanduser)�self�r
�5/opt/alt/python37/lib64/python3.7/distutils/config.py�_get_rc_file&szPyPIRCCommand._get_rc_filec	CsH|��}t�t�|tjtjBd�d��}|�t||f�WdQRXdS)Ni��w)rr�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�fr
r
r�
_store_pypirc*s zPyPIRCCommand._store_pypirccCs�|��}tj�|��r�|�d|�|jp.|j}t�}|�|�|�	�}d|k�rF|�
dd�}dd�|�d�D�}|gkr�d|kr�dg}niSx�|D]�}d|i}|�
|d	�|d	<xHd
|jfd|jfdfD].\}	}
|�
||	�r�|�
||	�||	<q�|
||	<q�W|dk�r"||jdfk�r"|j|d
<|S|d|k�s<|d
|kr�|Sq�WnRd
|k�r�d
}|�
|d
��rp|�
|d
�}n|j}|�
|d	�|�
|d�|||jd�SiS)NzUsing PyPI login from %sZ	distutilsz
index-serverscSs g|]}|��dkr|���qS)�)�strip)�.0�serverr
r
r�
<listcomp>=sz.PyPIRCCommand._read_pypirc.<locals>.<listcomp>�
rrr�
repository�realm)rNzserver-loginr)rrr"rr#)rrr	�existsZannouncer"�DEFAULT_REPOSITORYr�read�sections�get�split�
DEFAULT_REALMZ
has_option)rrr"Zconfigr'Z
index_serversZ_serversrZcurrent�key�defaultr
r
r�_read_pypirc0sV









zPyPIRCCommand._read_pypirccCs8ddl}|�dd�}|�|�d�dd�}|���|�S)Nrzcontent-typez
text/plain��charset�ascii)�cgiZ	getheaderZparse_headerr(r&�decode)rZresponser1Zcontent_type�encodingr
r
r�_read_pypi_responsepsz!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)Nr)r"r#Z
show_response)rr
r
r�initialize_optionswsz PyPIRCCommand.initialize_optionscCs(|jdkr|j|_|jdkr$|j|_dS)N)r"r%r#r*)rr
r
r�finalize_options}s

zPyPIRCCommand.finalize_options)�__name__�
__module__�__qualname__r%r*r"r#Zuser_optionsZboolean_optionsrrr-r4r5r6r
r
r
rrs@r)rZconfigparserrZ
distutils.cmdrrrr
r
r
r�<module>s