Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/setuptools/command/
Upload File :
Current File : //proc/thread-self/root/proc/thread-self/root/proc/self/root/lib/python2.7/site-packages/setuptools/command/upload_docs.pyc

�
�fc@s�dZddlmZddlmZddlmZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlmZddlmZmZddlmZd	d
lmZd�Zdefd
��YZdS(spupload_docs

Implements a Distutils 'upload_docs' subcommand (upload documentation to
PyPI's pythonhosted.org).
i����(tstandard_b64encode(tlog(tDistutilsOptionErrorN(tsix(thttp_clientturllib(titer_entry_pointsi(tuploadcCs%tjrdnd}|jd|�S(Ntsurrogateescapetstrictsutf-8(RtPY3tencode(tsterrors((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt_encodestupload_docscBs�eZdZdZdddejfddgZejZd	�Zd
efgZ	d�Z
d�Zd
�Zd�Z
ed��Zed��Zd�ZRS(shttps://pypi.python.org/pypi/sUpload documentation to PyPIsrepository=trsurl of repository [default: %s]s
show-responses&display full response text from serversupload-dir=sdirectory to uploadcCs1|jdkr-xtdd�D]}tSWndS(Nsdistutils.commandstbuild_sphinx(t
upload_dirtNoneRtTrue(tselftep((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt
has_sphinx/sRcCs#tj|�d|_d|_dS(N(Rtinitialize_optionsRRt
target_dir(R((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyR6s
	cCs�tj|�|jdkrs|j�rF|jd�}|j|_q�|jd�}tj	j
|jd�|_n|jd�|j|_d|j
kr�tjd�n|jd|j�dS(NRtbuildtdocsRspypi.python.orgs3Upload_docs command is deprecated. Use RTD instead.sUsing upload directory %s(Rtfinalize_optionsRRRtget_finalized_commandtbuilder_target_dirRtostpathtjoint
build_basetensure_dirnamet
repositoryRtwarntannounce(RRR((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyR;s

cCs�tj|d�}z�|j|j�x�tj|j�D]�\}}}||jkry|ryd}t||j��nxj|D]b}tjj||�}|t	|j�j
tjj�}	tjj|	|�}
|j||
�q�Wq8WWd|j
�XdS(Ntws'no files found in upload directory '%s'(tzipfiletZipFiletmkpathRRtwalkRR R!tlentlstriptseptwritetclose(Rtfilenametzip_filetroottdirstfilesttmpltnametfulltrelativetdest((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pytcreate_zipfileKs"
"cCs�x!|j�D]}|j|�q
Wtj�}|jjj�}tjj	|d|�}z|j
|�|j|�Wdtj
|�XdS(Ns%s.zip(tget_sub_commandstrun_commandttempfiletmkdtemptdistributiontmetadatatget_nameRR R!R;tupload_filetshutiltrmtree(Rtcmd_namettmp_dirR7R2((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pytrun[s
ccs�|\}}d|}t|t�s1|g}nx�|D]x}t|t�rl|d|d7}|d}nt|�}|Vt|�VdV|V|r8|ddkr8dVq8q8WdS(	Ns*
Content-Disposition: form-data; name="%s"s; filename="%s"iis

i����s
s
(t
isinstancetlistttupleR(titemtsep_boundarytkeytvaluesttitletvalue((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt_build_partis


cCs�d}d|}|d}|df}tj|jd|�}t||j��}tjj|�}tj||�}	d|jd�}
dj	|	�|
fS(	s=
        Build up the MIME payload for the POST data
        s3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--s
RMs multipart/form-data; boundary=%stasciit(
t	functoolstpartialRRtmaptitemst	itertoolstchaint
from_iterabletdecodeR!(tclstdatatboundaryRMtend_boundaryt	end_itemstbuildertpart_groupstpartst
body_itemstcontent_type((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt_build_multipart}s

		cCst|d��}|j�}WdQX|jj}idd6|j�d6tjj|�|fd6}t|j	d|j
�}t|�}tj
r�|jd�}nd|}|j|�\}}	d	|j}
|j|
tj�tjj|j�\}}}
}}}|r|r|s%t�|d
krCtj|�}n.|dkratj|�}ntd|��d
}yw|j�|jd|
�|	}|jd|�|jdtt|���|jd|�|j �|j!|�Wn0t"j#k
r }|jt|�tj$�dSX|j%�}|j&dkrhd|j&|j'f}
|j|
tj�n�|j&dkr�|j(d�}|dkr�d|j�}nd|}
|j|
tj�n)d|j&|j'f}
|j|
tj$�|j*rdd|j�ddfGHndS(Ntrbt
doc_uploads:actionR7tcontentt:RSsBasic sSubmitting documentation to %sthttpthttpssunsupported schema RTtPOSTsContent-typesContent-lengtht
Authorizationi�sServer response (%s): %si-tLocationshttps://pythonhosted.org/%s/sUpload successful. Visit %ssUpload failed (%s): %st-iK(+topentreadR@RARBRR tbasenameRtusernametpasswordRRR
R\RgR$R&RtINFORtparseturlparsetAssertionErrorRtHTTPConnectiontHTTPSConnectiontconnectt
putrequestt	putheadertstrR,t
endheaderstsendtsocketterrortERRORtgetresponsetstatustreasont	getheaderRt
show_response(RR1tfRjtmetaR^tcredentialstauthtbodytcttmsgtschematnetlocturltparamstqueryt	fragmentstconnRfteRtlocation((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyRC�sb
	

'


	N(s
show-responseNs&display full response text from server(supload-dir=Nsdirectory to upload(t__name__t
__module__tDEFAULT_REPOSITORYtdescriptionRRtuser_optionstboolean_optionsRtsub_commandsRRR;RHtstaticmethodRRtclassmethodRgRC(((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyRs"
							(t__doc__tbase64Rt	distutilsRtdistutils.errorsRRR�R(R>RDRYRUtsetuptools.externRtsetuptools.extern.six.movesRRt
pkg_resourcesRRRR(((sB/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt<module>s 	

Hacked By AnonymousFox1.0, Coded By AnonymousFox