AlkantarClanX12

Your IP : 18.190.176.176


Current Path : /lib/python3.8/site-packages/setuptools/command/__pycache__/
Upload File :
Current File : //lib/python3.8/site-packages/setuptools/command/__pycache__/upload.cpython-38.pyc

U

�Qab��@s�ddlZddlZddlZddlZddlmZddlmZddlm	Z
ddlmZddl
mZddlmZmZddlmZdd	lmZGd
d�de
j	�Z	dS)�N)�standard_b64encode)�log)�upload)�spawn)�DistutilsError)�urlopen�Request)�	HTTPError)�urlparsec@s8eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�ZdS)
rza
    Override default upload behavior to obtain password
    in a variety of different ways.
    c
Cs&ztj�|�W5|�dtj�XdS)NzjWARNING: Uploading via this command is deprecated, use twine to upload instead (https://pypi.org/p/twine/))�announcerZWARN�origr�run��self�r�=/usr/lib/python3.8/site-packages/setuptools/command/upload.pyr
s�z
upload.runcCs8tj�|�|jpt��|_|jp0|��p0|��|_dS�N)	rr�finalize_options�username�getpassZgetuser�password�_load_password_from_keyring�_prompt_for_passwordrrrrr"s���zupload.finalize_optionsc Cs�t|j�\}}}}}}	|s"|s"|	r0td|j��|dkrDtd|��|jr|ddd|g}
|jrnd|jg|
dd�<t|
|jd	�t|d
��}|��}W5QRX|j	j
}
dd|
��|
��t
j�|�|f||t�|���t|
���|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
��|
� �|
�!�d
�}d|d<|j�rdt
j�|�dt|dd
���f|d<|j"d|j#�$d�}dt%|��&d�}d}d|�$d�}|d}t'�(�}|�)�D]�\}}d|}t*|t+��s�|g}|D]j}t,|�t-k�r|d|d7}|d}nt|��$d�}|�.|�|�.|�$d��|�.d�|�.|��qܐq�|�.|�|�/�}d||jf}|�0|t1j2�d|tt3|��|d �}t4|j||d!�}zt5|�}|�6�}|j7}Wnft8k
�r�}z|j9}|j7}W5d}~XYn8t:k
�r"}z|�0t|�t1j;��W5d}~XYnX|d"k�r�|�0d#||ft1j2�|j<�r�t=|d$d%d&��|�}|dk	�r�d'�>d(|d(f�}|�0|t1j2�n"d)||f}|�0|t1j;�t?|��dS)*NzIncompatible url %s)ZhttpZhttpszunsupported schema Zgpgz
--detach-signz-az--local-user�)�dry_run�rbZfile_upload�1)z:actionZprotocol_version�name�version�contentZfiletype�	pyversionZ
md5_digestZmetadata_versionZsummaryZ	home_pageZauthorZauthor_email�license�description�keywords�platformZclassifiersZdownload_urlZprovidesZrequiresZ	obsoletes�Zcommentz.ascZ
gpg_signature�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"r�zutf-8s

zSubmitting %s to %sz multipart/form-data; boundary=%s)zContent-typezContent-lengthZ
Authorization)�data�headers��zServer response (%s): %sZ_read_pypi_responsecSsdSrr)�xrrr�<lambda>��z$upload.upload_file.<locals>.<lambda>�
zK---------------------------------------------------------------------------zUpload failed (%s): %s)@r
�
repository�AssertionErrorZsignZidentityrr�open�readZdistributionZmetadataZget_nameZget_version�os�path�basename�hashlibZmd5Z	hexdigest�strZget_metadata_versionZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletesrr�encoder�decode�io�BytesIO�items�
isinstance�list�type�tuple�write�getvaluerr�INFO�lenrrZgetcode�msgr	�code�OSErrorZERRORZ
show_response�getattr�joinr) rZcommandr �filenameZschemaZnetlocZurlZparamsZqueryZ	fragmentsZgpg_args�fr�metar)Z	user_passZauth�boundaryZsep_boundaryZend_boundaryZbody�key�value�titlerFr*Zrequest�resultZstatus�reason�e�textrrr�upload_file0s���
�!�




��

���
zupload.upload_filecCs4ztd�}|�|j|j�WStk
r.YnXdS)zM
        Attempt to load password from keyring. Suppress Exceptions.
        �keyringN)�
__import__Zget_passwordr0r�	Exception)rrWrrrr�s
z"upload._load_password_from_keyringc	Cs(z
t��WSttfk
r"YnXdS)zH
        Prompt for a password on the tty. Suppress Exceptions.
        N)rrY�KeyboardInterruptrrrrr�s
zupload._prompt_for_passwordN)	�__name__�
__module__�__qualname__�__doc__r
rrVrrrrrrrs

r)r;r4r7r�base64rZ	distutilsrZdistutils.commandrrZdistutils.spawnrZdistutils.errorsrZ*setuptools.extern.six.moves.urllib.requestrrZ(setuptools.extern.six.moves.urllib.errorr	Z(setuptools.extern.six.moves.urllib.parser
rrrr�<module>s