Normal -ˆÍÑ „B ÿÐÁÎ+q-a ´i=Jã@s´ddlZddlZddlmZddlmZddlmZddlmZddlm Z ddlm Z ddl m Z dd l mZdd lmZdd lmZdd lmZmZd d„ZGdd„deƒZdS)éN)Úglob)Úwarn)ÚCommand)Údir_util)Ú file_util)Ú archive_util)ÚTextFile)ÚFileList)Úlog)Ú convert_path)ÚDistutilsTemplateErrorÚDistutilsOptionErrorcCs`ddlm}ddlm}g}| ¡D] }| d|d||df¡q$| ¡||ƒ d¡dS)Nr)Ú FancyGetopt)ÚARCHIVE_FORMATSúformats=éz.List of available source distribution formats:)Zdistutils.fancy_getoptrZdistutils.archive_utilrÚkeysÚappendÚsortÚ print_help)rrÚformatsÚformat©rú//usr/lib64/python3.9/distutils/command/sdist.pyÚ show_formatss     ÿÿrc@seZdZdZdd„Zgd¢Zgd¢ZdddefgZd d d œZ d efgZ d Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zedd„ƒZdd„Zdd„Zd d!„Zd"d#„Zd$d%„Zd&d'„Zd(d)„Zd*d+„Zd,d-„Zd.d/„Zd0d1„Zd2d3„Zd4d5„Z d6d7„Z!d8d9„Z"dS):Úsdistz6create a source distribution (tarball, zip file, etc.)cCs|jS©N)Úmetadata_check©ÚselfrrrÚchecking_metadata(szsdist.checking_metadata))z template=Útz5name of manifest template file [default: MANIFEST.in])z manifest=Úmz)name of manifest file [default: MANIFEST])ú use-defaultsNzRinclude the default file set in the manifest [default; disable with --no-defaults])ú no-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])úno-pruneNz$don't automatically exclude anything)ú manifest-onlyÚozEjust regenerate the manifest and then stop (implies --force-manifest))úforce-manifestÚfzkforcibly regenerate the manifest and carry on as usual. Deprecated: now the manifest is always regenerated.)rNz6formats for source distribution (comma-separated list))ú 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])úmetadata-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])r#r%r'r)r+r.z help-formatsNz#list available distribution formatsr#r%)r$r&Úcheck)ZREADMEz README.txtz README.rstcCsTd|_d|_d|_d|_d|_d|_dg|_d|_d|_d|_ d|_ d|_ d|_ dS)NérÚgztar) ÚtemplateÚmanifestÚ use_defaultsr%Ú manifest_onlyZforce_manifestrÚ keep_tempÚdist_dirÚ archive_filesrÚownerÚgrouprrrrÚinitialize_optionseszsdist.initialize_optionscCsZ|jdurd|_|jdur d|_| d¡t |j¡}|rFtd|ƒ‚|jdurVd|_dS)NZMANIFESTz MANIFEST.inrzunknown archive format '%s'Údist)r5r4Zensure_string_listrZcheck_archive_formatsrr r9)rZ bad_formatrrrÚfinalize_options|s    ÿ zsdist.finalize_optionscCs>tƒ|_| ¡D]}| |¡q| ¡|jr2dS| ¡dSr)r ÚfilelistZget_sub_commandsZ run_commandÚ get_file_listr7Úmake_distribution)rZcmd_namerrrÚrunŒs  z sdist.runcCs*tdtƒ|j d¡}| ¡| ¡dS)Nzadistutils.command.sdist.check_metadata is deprecated, use the check command insteadr1)rÚPendingDeprecationWarningÚ distributionZget_command_objZensure_finalizedrC)rr1rrrÚcheck_metadata¢s ÿ zsdist.check_metadatac