관리-도구
편집 파일: upload_docs.cpython-34.pyc
� M�Re� � @ s d 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 d d l m Z d d l m Z d d l m Z d d l m Z m Z m Z m Z m Z e r� d n d Z d d d � Z Gd d � d e � Z d S)zpupload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). � N)�standard_b64encode)�iter_entry_points)�log)�DistutilsOptionError)�upload)�httplib�urlparse�unicode� iteritems�PY3�surrogateescape�strictzutf-8c C s# t | t � r | j | t � S| S)N)� isinstancer �encode�errors)�s�encoding� r �9/tmp/pip-l4uy7dan-build/setuptools/command/upload_docs.py�b s r c @ s� e Z d Z d Z d d d e j f d d g Z e j Z d d � Z d e f g Z d d � Z d d � Z d d � Z d d � Z d d � Z d S)�upload_docszUpload documentation to PyPIzrepository=�rzurl of repository [default: %s]� show-responseN�&display full response text from server�upload-dir=�directory to uploadc C s1 | j d k r- x t d d � D] } d SWn d S)Nzdistutils.commands�build_sphinxT)� upload_dirr )�self�epr r r � has_sphinx0 s zupload_docs.has_sphinxr c C s# t j | � d | _ d | _ d S)N)r �initialize_optionsr � target_dir)r r r r r! 7 s zupload_docs.initialize_optionsc 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 | _ | j d | j � d S)Nr �buildZdocsr zUsing upload directory %s) r �finalize_optionsr r �get_finalized_commandZbuilder_target_dirr"