ok

Mini Shell

Direktori : /opt/alt/python36/lib64/python3.6/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/distutils/__pycache__/config.cpython-36.opt-2.pyc

3

��2a�@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]�
show-response�&display full response text from servercCstjjtjjd�d�S)N�~z.pypirc)�os�path�join�
expanduser)�self�r�+/opt/alt/python36/lib64/python3.6/config.py�_get_rc_file&szPyPIRCCommand._get_rc_filecCsH|j�}tjtj|tjtjBd�d��}|jt||f�WdQRXdS)Ni��w)rr
�fdopen�open�O_CREAT�O_WRONLY�write�DEFAULT_PYPIRC)r�username�password�rc�frrr�
_store_pypirc*s zPyPIRCCommand._store_pypirccCs�|j�}tjj|��r�|jd|�|jp.|j}|jp:|j}t	�}|j
|�|j�}d|k�rR|jdd�}dd�|j
d�D�}|gkr�d|kr�dg}niSx�|D]�}d|i}	|j|d	�|	d	<xHd
|jfd|jfdfD].\}
}|j||
�r�|j||
�|	|
<q�||	|
<q�W|dk�r.||jdfk�r.|j|	d
<|	S|	d|k�sH|	d
|kr�|	Sq�WnRd
|k�r�d
}|j|d
��r||j|d
�}n|j}|j|d	�|j|d�|||jd�SiS)NzUsing PyPI login from %sZ	distutilsz
index-serverscSs g|]}|j�dkr|j��qS)�)�strip)�.0�serverrrr�
<listcomp>>sz.PyPIRCCommand._read_pypirc.<locals>.<listcomp>�
rr!r�
repository�realmrzserver-login)rrr$r!r%)rN)rr
r�existsZannouncer$�DEFAULT_REPOSITORYr%�
DEFAULT_REALMr�read�sections�get�splitZ
has_option)rrr$r%�configr*Z
index_serversZ_serversr!Zcurrent�key�defaultrrr�_read_pypirc0sX









zPyPIRCCommand._read_pypirccCs8ddl}|jdd�}|j|�djdd�}|j�j|�S)Nrzcontent-typez
text/plain��charset�ascii)�cgiZ	getheaderZparse_headerr+r)�decode)rZresponser4Zcontent_type�encodingrrr�_read_pypi_responseqsz!PyPIRCCommand._read_pypi_responsecCsd|_d|_d|_dS)Nr)r$r%Z
show_response)rrrr�initialize_optionsxsz PyPIRCCommand.initialize_optionscCs(|jdkr|j|_|jdkr$|j|_dS)N)r$r'r%r()rrrr�finalize_options~s

zPyPIRCCommand.finalize_options)rNr)�__name__�
__module__�__qualname__r'r(r$r%Zuser_optionsZboolean_optionsrrr0r7r8r9rrrrrs Ar)r
ZconfigparserrZ
distutils.cmdrrrrrrr�<module>s


Zerion Mini Shell 1.0