관리-도구
편집 파일: sdist.cpython-37.opt-1.pyc
B � f7J � @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddlm Z ddlmZ dd lm Z dd lmZ ddlmZ ddlmZ dd lmZmZ dd� ZG dd� de�ZdS )zadistutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).� N)�glob)�warn)�Command)�dir_util)� file_util)�archive_util)�TextFile)�FileList)�log)�convert_path)�DistutilsTemplateError�DistutilsOptionErrorc C sd ddl m} ddlm} g }x,|�� D ] }|�d| d|| d f� q&W |�� | |��d� dS )zoPrint all possible values for the 'formats' option (used by the "--help-formats" command-line option). r )�FancyGetopt)�ARCHIVE_FORMATSzformats=N� z.List of available source distribution formats:)Zdistutils.fancy_getoptr Zdistutils.archive_utilr �keys�append�sortZ print_help)r r �formats�format� r �</opt/alt/python37/lib64/python3.7/distutils/command/sdist.py�show_formats s r c @ s" e Zd ZdZdd� Zdddddd d ddd ddddgZddddddgZdddefgZddd�Z defgZ dZdd� Zd d!� Z d"d#� Zd$d%� Zd&d'� Zd(d)� Zed*d+� �Zd,d-� Zd.d/� Zd0d1� Zd2d3� Zd4d5� Zd6d7� Zd8d9� Zd:d;� Zd<d=� Zd>d?� Zd@dA� ZdBdC� ZdDdE� Z dFdG� Z!dHdI� Z"dS )J�sdistz6create a source distribution (tarball, zip file, etc.)c C s | j S )zYCallable used for the check sub-command. Placed here so user_options can view it)�metadata_check)�selfr r r �checking_metadata( s zsdist.checking_metadata)z template=�tz5name of manifest template file [default: MANIFEST.in])z manifest=�mz)name of manifest file [default: MANIFEST])zuse-defaultsNzRinclude the default file set in the manifest [default; disable with --no-defaults])zno-defaultsNz"don't include the default file set)�pruneNz�specifically exclude files/directories that should not be distributed (build tree, RCS/CVS dirs, etc.) [default; disable with --no-prune])zno-pruneNz$don't automatically exclude anything)z manifest-only�ozEjust regenerate the manifest and then stop (implies --force-manifest))zforce-manifest�fzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)zformats=Nz6formats for source distribution (comma-separated list))z keep-temp�kz@keep the distribution tree around after creating archive file(s))z dist-dir=�dzFdirectory to put the source distribution archive(s) in [default: dist])zmetadata-checkNz[Ensure that all required elements of meta-data are supplied. Warn if any missing. [default])zowner=�uz@Owner name used when creating a tar file [default: current user])zgroup=�gzAGroup name used when creating a tar file [default: current group]zuse-defaultsr z manifest-onlyzforce-manifestz keep-tempzmetadata-checkzhelp-formatsNz#list available distribution formats)zno-defaultszno-prune�check)ZREADMEz README.txtz README.rstc C sT d | _ d | _d| _d| _d| _d| _dg| _d| _d | _d | _ d| _ d | _d | _d S )N� r Zgztar) �template�manifest�use_defaultsr � manifest_onlyZforce_manifestr � keep_temp�dist_dir� archive_filesr �owner�group)r r r r �initialize_optionse s zsdist.initialize_optionsc C sZ | j d krd| _ | jd kr d| _| �d� t�| j�}|rFtd| ��| jd krVd| _d S )NZMANIFESTzMANIFEST.inr zunknown archive format '%s'Zdist)r) r( Zensure_string_listr Zcheck_archive_formatsr r r- )r Z bad_formatr r r �finalize_options| s zsdist.finalize_optionsc C sB t � | _x| �� D ]}| �|� qW | �� | jr6d S | �� d S )N)r �filelistZget_sub_commandsZrun_command� get_file_listr+ �make_distribution)r Zcmd_namer r r �run� s z sdist.runc C s* t dt� | j�d�}|�� |�� dS )zDeprecated API.zadistutils.command.sdist.check_metadata is deprecated, use the check command insteadr&