관리-도구
편집 파일: upload_docs.cpython-35.pyc
�Re� � @ 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 d � Z Gd d � d e � Z d S)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� )�uploadc C s% t j r d n d } | j d | � S)N�surrogateescape�strictzutf-8)r �PY3�encode)�s�errors� r ��/builddir/build/BUILDROOT/alt-python35-setuptools-36.3.0-4.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/setuptools/command/upload_docs.py�_encode s r c @ s� e Z d 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 e d d � � Z e d d � � Z d d � Z d S)�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 uploadc C s. | j d k r* x t d d � D] } d SWd S)Nzdistutils.commands�build_sphinxT)� upload_dirr )�self�epr r r � has_sphinx/ 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 6 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 | _ d | j k r� t j d � | j d | j � d S)Nr �buildZdocsr zpypi.python.orgz3Upload_docs command is deprecated. Use RTD instead.zUsing upload directory %s)r �finalize_optionsr r �get_finalized_commandZbuilder_target_dirr �os�path�join� build_base�ensure_dirname� repositoryr �warn�announce)r r r! r r r r"