U ÙAT^ºc@sDddlZddlmZddlTddlmZdd„ZGdd„deƒZdS) éN)ÚCommand)Z*)Ú get_platformcCsPddlm}g}tjD]"}| d|dtj|df¡q||ƒ}| d¡dS)Nr)Ú FancyGetoptúformats=éz'List of available distribution formats:)Zdistutils.fancy_getoptrÚbdistÚformat_commandsÚappendÚformat_commandZ print_help)rÚformatsÚformatZpretty_printer©r ú//usr/lib64/python3.8/distutils/command/bdist.pyÚ show_formats s    ÿrc @s–eZdZdZddddeƒfdddd d gZd gZd d defgZdZ dddœZ dddddddddg Z ddddddd d!d"d#œ Z d$d%„Z d&d'„Zd(d)„Zd S)*rz$create a built (binary) distribution)z bdist-base=Zbz4temporary directory for creating built distributionsz plat-name=Zpz;platform name to embed in generated filenames (default: %s))rNz/formats for distribution (comma-separated list))z dist-dir=Zdz=directory to put final built distributions in [default: dist])ú skip-buildNz2skip rebuilding everything (for testing/debugging))zowner=Zuz@Owner name used when creating a tar file [default: current user])zgroup=ZgzAGroup name used when creating a tar file [default: current group]rz help-formatsNz$lists available distribution formats)Ú bdist_rpmÚgztarÚzip)ZposixZntÚrpmÚbztarÚxztarÚztarÚtarÚwininstÚmsi)rzRPM distribution)Ú bdist_dumbzgzip'ed tar file)rzbzip2'ed tar file)rzxz'ed tar file)rzcompressed tar file)rztar file)Z bdist_wininstzWindows executable installer)rzZIP file)Z bdist_msizMicrosoft Installer) rrrrrrrrrcCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)Ú bdist_baseÚ plat_namer Údist_dirÚ skip_buildÚgroupÚowner)Úselfr r r Úinitialize_optionsQszbdist.initialize_optionscCs´|jdkr(|jrtƒ|_n| d¡j|_|jdkrT| d¡j}tj |d|j¡|_|  d¡|j dkr z|j tj g|_ Wn"t k ržtdtj ƒ‚YnX|jdkr°d|_dS)NZbuildzbdist.r z;don't know how to create built distributions on platform %sZdist)rrrZget_finalized_commandrÚ build_baseÚosZpathZjoinZensure_string_listr Údefault_formatZnameÚKeyErrorZDistutilsPlatformErrorr)r!r#r r r Úfinalize_optionsZs*    ÿ  ÿÿ  zbdist.finalize_optionsc CsÆg}|jD]>}z| |j|d¡Wq tk rFtd|ƒ‚Yq Xq tt|jƒƒD]h}||}| |¡}||jkr„|j||_ |dkrœ|j |_ |j |_ |||dd…kr¶d|_ |  |¡qXdS)Nrzinvalid format '%s'rr)r rr r&ZDistutilsOptionErrorZrangeZlenZreinitialize_commandÚno_format_optionr r rZ keep_tempZ run_command)r!Zcommandsr ZiZcmd_nameZsub_cmdr r r Úrunvs"    z bdist.run)Z__name__Z __module__Z __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr(r%rr r"r'r)r r r r rsRÿÿñÿÿÿ ÿ÷  r)r$Zdistutils.corerZdistutils.errorsZdistutils.utilrrrr r r r Zs