OwlCyberSecurity - MANAGER
Edit File: upload_docs.pyc
� �fc�����������@���s����d��Z��d�d�l�m�Z�d�d�l�m�Z�d�d�l�m�Z�d�d�l�Z�d�d�l�Z�d�d�l �Z �d�d�l �Z �d�d�l�Z�d�d�l�Z�d�d�l �Z �d�d�l�m�Z�d�d�l�m�Z�m�Z�d�d�l�m�Z�d �d �l�m�Z�d����Z�d�e�f�d �������YZ�d�S(���sp���upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). i����(���t���standard_b64encode(���t���log(���t���DistutilsOptionErrorN(���t���six(���t���http_clientt���urllib(���t���iter_entry_pointsi���(���t���uploadc���������C���s%���t��j�r�d�n�d�}�|��j�d�|���S(���Nt���surrogateescapet���stricts���utf-8(���R���t���PY3t���encode(���t���st���errors(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt���_encode���s����t���upload_docsc�����������B���s����e��Z�d��Z�d�Z�d�d�d�e�j�f�d�d�g�Z�e�j�Z�d ����Z�d �e�f�g�Z �d����Z �d����Z�d ����Z�d����Z �e�d������Z�e�d������Z�d����Z�RS(���s���https://pypi.python.org/pypi/s���Upload documentation to PyPIs���repository=t���rs���url of repository [default: %s]s ���show-responses&���display full response text from servers���upload-dir=s���directory to uploadc���������C���s1���|��j��d��k�r-�x�t�d�d���D]�}�t�SWn��d��S(���Ns���distutils.commandst���build_sphinx(���t ���upload_dirt���NoneR���t���True(���t���selft���ep(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt ���has_sphinx/���s����R���c���������C���s#���t��j�|����d��|��_�d��|��_�d��S(���N(���R���t���initialize_optionsR���R���t ���target_dir(���R���(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyR���6���s���� c���������C���s����t��j�|����|��j�d��k�rs�|��j����rF�|��j�d���}�|�j�|��_�q��|��j�d���}�t�j �j �|�j�d���|��_�n�|��j�d���|��j�|��_�d�|��j �k�r��t�j�d���n��|��j�d�|��j���d��S(���NR���t���buildt���docsR���s���pypi.python.orgs3���Upload_docs command is deprecated. Use RTD instead.s���Using upload directory %s(���R���t���finalize_optionsR���R���R���t���get_finalized_commandt���builder_target_dirR���t���ost���patht���joint ���build_baset���ensure_dirnamet ���repositoryR���t���warnt���announce(���R���R���R���(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyR���;���s���� c���������C���s����t��j�|�d���}�z��|��j�|��j���x��t�j�|��j���D]��\�}�}�}�|�|��j�k�ry�|�ry�d�}�t�|�|��j�����n��xj�|�D]b�}�t�j�j�|�|���}�|�t �|��j���j �t�j�j���} �t�j�j�| �|���} �|�j�|�| ���q��Wq8�WWd��|�j ����Xd��S(���Nt���ws'���no files found in upload directory '%s'(���t���zipfilet���ZipFilet���mkpathR���R���t���walkR���R ���R!���t���lent���lstript���sept���writet���close(���R���t���filenamet���zip_filet���roott���dirst���filest���tmplt���namet���fullt���relativet���dest(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt���create_zipfileK���s����" "c���������C���s����x!�|��j�����D]�}�|��j�|���q �Wt�j����}�|��j�j�j����}�t�j�j �|�d�|���}�z�|��j �|���|��j�|���Wd��t�j �|���Xd��S(���Ns���%s.zip(���t���get_sub_commandst���run_commandt���tempfilet���mkdtempt���distributiont���metadatat���get_nameR���R ���R!���R;���t���upload_filet���shutilt���rmtree(���R���t���cmd_namet���tmp_dirR7���R2���(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt���run[���s���� c���������c���s����|��\�}�}�d�|�}�t��|�t���s1�|�g�}�n��x��|�D]x�}�t��|�t���rl�|�d�|�d�7}�|�d�}�n�t�|���}�|�Vt�|���Vd�V|�V|�r8�|�d�d�k�r8�d�Vq8�q8�Wd��S( ���Ns*��� Content-Disposition: form-data; name="%s"s���; filename="%s"i����i���s��� i����s��� s��� (���t ���isinstancet���listt���tupleR���(���t���itemt���sep_boundaryt���keyt���valuest���titlet���value(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt���_build_parti���s���� c���������C���s����d�}�d�|�}�|�d�}�|�d�f�}�t��j�|��j�d�|��}�t�|�|�j������}�t�j�j�|���}�t�j�|�|���} �d�|�j�d���} �d�j �| ���| �f�S( ���s=��� Build up the MIME payload for the POST data s3���--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s��� --s���--s��� RM���s ���multipart/form-data; boundary=%st���asciit����( ���t ���functoolst���partialRR���t���mapt���itemst ���itertoolst���chaint ���from_iterablet���decodeR!���(���t���clst���datat���boundaryRM���t���end_boundaryt ���end_itemst���buildert���part_groupst���partst ���body_itemst���content_type(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt���_build_multipart}���s���� c���������C���s��t��|�d�����}�|�j����}�Wd��QX|��j�j�}�i�d�d�6|�j����d�6t�j�j�|���|�f�d�6}�t�|��j �d�|��j ���}�t�|���}�t�j �r��|�j�d���}�n��d�|�}�|��j�|���\�}�} �d �|��j�} �|��j�| �t�j���t�j�j�|��j���\�}�}�} �}�}�}�|�r|�r|�s%t���|�d �k�rCt�j�|���}�n.�|�d�k�rat�j�|���}�n�t�d�|�����d �}�yw�|�j����|�j�d�| ���| �}�|�j�d�|���|�j�d�t�t�|�������|�j�d�|���|�j ����|�j!�|���Wn0�t"�j#�k �r }�|��j�t�|���t�j$���d��SX|�j%����}�|�j&�d�k�rhd�|�j&�|�j'�f�} �|��j�| �t�j���n��|�j&�d�k�r�|�j(�d���}�|�d��k�r�d�|�j����}�n��d�|�} �|��j�| �t�j���n)�d�|�j&�|�j'�f�} �|��j�| �t�j$���|��j*�rd�d�|�j����d�d�f�GHn��d��S(���Nt���rbt ���doc_uploads���:actionR7���t���contentt���:RS���s���Basic s���Submitting documentation to %st���httpt���httpss���unsupported schema RT���t���POSTs���Content-types���Content-lengtht ���Authorizationi����s���Server response (%s): %si-��t���Locations���https://pythonhosted.org/%s/s���Upload successful. Visit %ss���Upload failed (%s): %st���-iK���(+���t���opent���readR@���RA���RB���R���R ���t���basenameR���t���usernamet���passwordR����R���R ���R\���Rg���R$���R&���R���t���INFOR���t���parset���urlparset���AssertionErrorR���t���HTTPConnectiont���HTTPSConnectiont���connectt ���putrequestt ���putheadert���strR,���t ���endheaderst���sendt���sockett���errort���ERRORt���getresponset���statust���reasont ���getheaderR���t ���show_response(���R���R1���t���fRj���t���metaR^���t���credentialst���autht���bodyt���ctt���msgt���schemat���netloct���urlt���paramst���queryt ���fragmentst���connRf���t���eR���t���location(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyRC�������sb���� ' N(���s ���show-responseNs&���display full response text from server(���s���upload-dir=Ns���directory to upload(���t���__name__t ���__module__t���DEFAULT_REPOSITORYt���descriptionR���R���t���user_optionst���boolean_optionsR���t���sub_commandsR���R���R;���RH���t���staticmethodRR���t���classmethodRg���RC���(����(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyR������s"��� � (���t���__doc__t���base64R����t ���distutilsR���t���distutils.errorsR���R���R����R(���R>���RD���RY���RU���t���setuptools.externR���t���setuptools.extern.six.movesR���R���t ���pkg_resourcesR���R���R���R���(����(����(����sB���/usr/lib/python2.7/site-packages/setuptools/command/upload_docs.pyt���<module>���s ���