관리-도구
편집 파일: upload_docs.cpython-36.pyc
3 K�Re� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlZddlZddl Z ddl Z ddlZddlZddl Z ddlmZ ddlmZmZ ddlmZ d d lmZ dd� ZG d d� de�ZdS )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 jr dnd}| jd|�S )N�surrogateescape�strictzutf-8)r �PY3�encode)�s�errors� r ��/builddir/build/BUILDROOT/alt-python36-setuptools-38.5.2-7.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/setuptools/command/upload_docs.py�_encode s r c @ s� e Zd ZdZdZdddej fddgZejZdd� Zd efgZ dd� Z dd� Zdd� Zdd� Z edd� �Zedd� �Zdd� ZdS )�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 kr xtdd�D ]}dS W d 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| � | jd krN| j� r0| jd�}|j| _q`| jd�}tjj |j d�| _n| jd� | j| _d| jkrtt jd� | jd| 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"