404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.137.187.44: ~ $
3

9��f��@s�dZddlmZddlmZddlmZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZmZddlmZd	d
lmZdd�ZGd
d�de�ZdS)zpupload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
PyPI's pythonhosted.org).
�)�standard_b64encode)�log)�DistutilsOptionErrorN)�six)�http_client�urllib)�iter_entry_points�)�uploadcCstjr
dnd}|jd|�S)N�surrogateescape�strictzutf-8)r�PY3�encode)�s�errors�r�!/usr/lib/python3.6/upload_docs.py�_encodesrc@s�eZdZdZdZdddejfddgZejZdd�Zd
efgZ	dd�Z
dd�Zdd�Zdd�Z
edd��Zedd��Zdd�ZdS)�upload_docszhttps://pypi.python.org/pypi/zUpload documentation to PyPIzrepository=�rzurl of repository [default: %s]�
show-responseN�&display full response text from server�upload-dir=�directory to uploadcCs$|jdkr xtdd�D]}dSWdS)Nzdistutils.commands�build_sphinxT)�
upload_dirr)�selfZeprrr�
has_sphinx/s
zupload_docs.has_sphinxrcCstj|�d|_d|_dS)N)r
�initialize_optionsr�
target_dir)rrrrr6s
zupload_docs.initialize_optionscCs�tj|�|jdkrN|j�r0|jd�}|j|_q`|jd�}tjj	|j
d�|_n|jd�|j|_d|jkrtt
jd�|jd|j�dS)Nr�buildZdocsrzpypi.python.orgz3Upload_docs command is deprecated. Use RTD instead.zUsing upload directory %s)r
�finalize_optionsrrZget_finalized_commandZbuilder_target_dirr�os�path�joinZ
build_baseZensure_dirname�
repositoryr�warn�announce)rrr rrrr!;s







zupload_docs.finalize_optionscCs�tj|d�}z�|j|j�x�tj|j�D]~\}}}||jkrT|rTd}t||j��xP|D]H}tjj||�}|t	|j�d�j
tjj�}	tjj|	|�}
|j||
�qZWq(WWd|j
�XdS)N�wz'no files found in upload directory '%s')�zipfileZZipFileZmkpathrr"�walkrr#r$�len�lstrip�sep�write�close)r�filename�zip_file�root�dirs�filesZtmpl�nameZfullZrelative�destrrr�create_zipfileKs
zupload_docs.create_zipfilecCslx|j�D]}|j|�q
Wtj�}|jjj�}tjj	|d|�}z|j
|�|j|�Wdtj
|�XdS)Nz%s.zip)Zget_sub_commandsZrun_command�tempfileZmkdtemp�distribution�metadata�get_namer"r#r$r7�upload_file�shutilZrmtree)rZcmd_nameZtmp_dirr5r1rrr�run[s
zupload_docs.runccs�|\}}d|}t|t�s |g}xn|D]f}t|t�rN|d|d7}|d}nt|�}|Vt|�VdV|V|r&|dd�dkr&dVq&WdS)	Nz*
Content-Disposition: form-data; name="%s"z; filename="%s"rr	s

�
�
���)�
isinstance�list�tupler)�item�sep_boundary�key�values�title�valuerrr�_build_partis




zupload_docs._build_partcCsnd}d|}|d}|df}tj|j|d�}t||j��}tjj|�}tj||�}	d|jd�}
dj	|	�|
fS)	z=
        Build up the MIME payload for the POST data
        s3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--r@)rFz multipart/form-data; boundary=%s�ascii�)
�	functools�partialrK�map�items�	itertools�chain�
from_iterable�decoder$)�cls�data�boundaryrFZend_boundaryZ	end_itemsZbuilderZpart_groups�partsZ
body_items�content_typerrr�_build_multipart}szupload_docs._build_multipartcCsPt|d��}|j�}WdQRX|jj}d|j�tjj|�|fd�}t|j	d|j
�}t|�}tj
rn|jd�}d|}|j|�\}}	d|j}
|j|
tj�tjj|j�\}}}
}}}|r�|r�|s�t�|dkr�tj|�}n |d	kr�tj|�}ntd
|��d}yZ|j�|jd|
�|	}|jd
|�|jdtt|���|jd|�|j �|j!|�Wn6t"j#k
�r�}z|jt|�tj$�dSd}~XnX|j%�}|j&dk�r�d|j&|j'f}
|j|
tj�nb|j&dk�r|j(d�}|dk�r�d|j�}d|}
|j|
tj�nd|j&|j'f}
|j|
tj$�|j)�rLt*dd|j�dd�dS)N�rbZ
doc_upload)z:actionr5�content�:rLzBasic zSubmitting documentation to %sZhttpZhttpszunsupported schema �ZPOSTzContent-typezContent-lengthZ
Authorization��zServer response (%s): %si-ZLocationzhttps://pythonhosted.org/%s/zUpload successful. Visit %szUpload failed (%s): %s�-�K)+�open�readr9r:r;r"r#�basenamerZusernameZpasswordrrr
rUr[r%r'r�INFOr�parseZurlparse�AssertionErrorrZHTTPConnectionZHTTPSConnectionZconnectZ
putrequestZ	putheader�strr+Z
endheaders�send�socket�errorZERRORZgetresponseZstatus�reasonZ	getheaderZ
show_response�print)rr0�fr]�metarWZcredentialsZauthZbodyZct�msgZschemaZnetlocZurlZparamsZqueryZ	fragmentsZconnrZ�er�locationrrrr<�s`



zupload_docs.upload_file)rNr)rNr)�__name__�
__module__�__qualname__ZDEFAULT_REPOSITORY�descriptionr
Zuser_optionsZboolean_optionsrZsub_commandsrr!r7r>�staticmethodrK�classmethodr[r<rrrrrs"

r)�__doc__�base64rZ	distutilsrZdistutils.errorsrr"rkr)r8r=rRrNZsetuptools.externrZsetuptools.extern.six.movesrrZ
pkg_resourcesrr
rrrrrr�<module>s 

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 664 B 0644
__init__.cpython-36.pyc File 664 B 0644
alias.cpython-36.opt-1.pyc File 2.3 KB 0644
alias.cpython-36.pyc File 2.3 KB 0644
bdist_egg.cpython-36.opt-1.pyc File 14 KB 0644
bdist_egg.cpython-36.pyc File 14 KB 0644
bdist_rpm.cpython-36.opt-1.pyc File 1.66 KB 0644
bdist_rpm.cpython-36.pyc File 1.66 KB 0644
bdist_wininst.cpython-36.opt-1.pyc File 901 B 0644
bdist_wininst.cpython-36.pyc File 901 B 0644
build_clib.cpython-36.opt-1.pyc File 2.32 KB 0644
build_clib.cpython-36.pyc File 2.32 KB 0644
build_ext.cpython-36.opt-1.pyc File 9.71 KB 0644
build_ext.cpython-36.pyc File 9.74 KB 0644
build_py.cpython-36.opt-1.pyc File 8.3 KB 0644
build_py.cpython-36.pyc File 8.3 KB 0644
develop.cpython-36.opt-1.pyc File 6.2 KB 0644
develop.cpython-36.pyc File 6.2 KB 0644
dist_info.cpython-36.opt-1.pyc File 1.29 KB 0644
dist_info.cpython-36.pyc File 1.29 KB 0644
easy_install.cpython-36.opt-1.pyc File 63.38 KB 0644
easy_install.cpython-36.pyc File 63.42 KB 0644
egg_info.cpython-36.opt-1.pyc File 20.4 KB 0644
egg_info.cpython-36.pyc File 20.4 KB 0644
install.cpython-36.opt-1.pyc File 3.81 KB 0644
install.cpython-36.pyc File 3.81 KB 0644
install_egg_info.cpython-36.opt-1.pyc File 2.31 KB 0644
install_egg_info.cpython-36.pyc File 2.31 KB 0644
install_lib.cpython-36.opt-1.pyc File 3.88 KB 0644
install_lib.cpython-36.pyc File 3.91 KB 0644
install_scripts.cpython-36.opt-1.pyc File 2.15 KB 0644
install_scripts.cpython-36.pyc File 2.15 KB 0644
py36compat.cpython-36.opt-1.pyc File 4.44 KB 0644
py36compat.cpython-36.pyc File 4.44 KB 0644
register.cpython-36.opt-1.pyc File 517 B 0644
register.cpython-36.pyc File 517 B 0644
rotate.cpython-36.opt-1.pyc File 2.44 KB 0644
rotate.cpython-36.pyc File 2.44 KB 0644
saveopts.cpython-36.opt-1.pyc File 848 B 0644
saveopts.cpython-36.pyc File 848 B 0644
sdist.cpython-36.opt-1.pyc File 6.16 KB 0644
sdist.cpython-36.pyc File 6.16 KB 0644
setopt.cpython-36.opt-1.pyc File 4.42 KB 0644
setopt.cpython-36.pyc File 4.42 KB 0644
test.cpython-36.opt-1.pyc File 7.9 KB 0644
test.cpython-36.pyc File 7.9 KB 0644
upload.cpython-36.opt-1.pyc File 1.28 KB 0644
upload.cpython-36.pyc File 1.28 KB 0644
upload_docs.cpython-36.opt-1.pyc File 5.86 KB 0644
upload_docs.cpython-36.pyc File 5.88 KB 0644