U e5dºã@sHdZddlZddlmZddlTddlmZdd„ZGdd „d eƒZdS) zidistutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).éN)ÚCommand)Ú*)Ú get_platformcCsPddlm}g}tjD]"}| d|dtj|df¡q||ƒ}| d¡dS)zFPrint list of available formats (arguments to "--format" option). r)Ú FancyGetoptúformats=Né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=Úbz4temporary directory for creating built distributionsz plat-name=Úpz;platform name to embed in generated filenames (default: %s))rNz/formats for distribution (comma-separated list))z dist-dir=Údz=directory to put final built distributions in [default: dist])ú skip-buildNz2skip rebuilding everything (for testing/debugging))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]rz help-formatsNz$lists available distribution formats)Ú bdist_rpmÚgztarÚzip)ÚposixÚntÚrpmÚbztarÚxztarÚztarÚtarÚwininstÚmsi)rzRPM distribution)Ú bdist_dumbzgzip'ed tar file)r#zbzip2'ed tar file)r#zxz'ed tar file)r#zcompressed tar file)r#ztar file)Z bdist_wininstzWindows executable installer)r#zZIP file)Z bdist_msizMicrosoft Installer) rrrrrr r!rr"cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)Ú bdist_baseÚ plat_namer Údist_dirÚ skip_buildÚgroupÚowner)ÚselfrrrÚ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)r%r'rZget_finalized_commandr$Ú build_baseÚosÚpathÚjoinZensure_string_listr Údefault_formatÚnameÚKeyErrorZDistutilsPlatformErrorr&)r*r,rrrÚ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'r#r)r r r r2ZDistutilsOptionErrorÚrangeÚlenZreinitialize_commandÚno_format_optionr r)r(Z keep_tempZ run_command)r*Zcommandsr ÚiZcmd_nameZsub_cmdrrrÚrunvs"    z bdist.run)Ú__name__Ú __module__Ú __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr6r0r r r+r3r8rrrrrsRÿÿñÿÿÿ ÿ÷  r) Ú__doc__r-Zdistutils.corerZdistutils.errorsZdistutils.utilrrrrrrrÚs