3 e2@sdZddlmZddlmZddlmZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZddlmZddlmZd d ZGd d d eZdS) z|upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to sites other than PyPi such as devpi). )standard_b64encode)log)DistutilsOptionErrorN)iter_entry_points)uploadcCs |jddS)Nzutf-8surrogateescape)encode)sr D/tmp/pip-build-vlmub77e/setuptools/setuptools/command/upload_docs.py_encodesr c@seZdZdZdZdddejfddgZejZd d Zd efgZ ddZ ddZ ddZ ddZ eddZeddZddZdS) upload_docszhttps://pypi.python.org/pypi/z;Upload documentation to sites other than PyPi such as devpiz repository=rzurl of repository [default: %s] show-responseN&display full response text from server upload-dir=directory to uploadcCs$|jdkr xtddD]}dSWdS)Nzdistutils.commands build_sphinxT) upload_dirr)selfepr r r has_sphinx-s zupload_docs.has_sphinxrcCstj|d|_d|_dS)N)rinitialize_optionsr target_dir)rr r r r4s zupload_docs.initialize_optionscCstj||jdkrV|jr8|jd}t|jd|_qh|jd}tj j |j d|_n|j d|j|_d|j kr|tjd|jd|jdS) NrhtmlbuildZdocsrzpypi.python.orgzrDr[rW http.clientrg urllib.parserw pkg_resourcesrrr rr r r r s