o ƒ_¶aºã@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:)Údistutils.fancy_getoptrÚbdistÚformat_commandsÚappendÚformat_commandÚ print_help)rÚformatsÚformatÚpretty_printer©rúE/usr/lib/python3/dist-packages/setuptools/_distutils/command/bdist.pyÚ show_formats s    ÿrc @sˆeZdZdZddddeƒfdddd d gZd gZd d defgZdZ dddœZ gd¢Z ddddddddddœ Z dd„Z dd „Zd!d"„Zd S)#r z$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) ÚrpmrÚbztarÚxztarÚztarÚtarÚwininstrÚ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)Ú bdist_wininstzWindows executable installer)r&zZIP file)Ú bdist_msizMicrosoft InstallercCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)Ú bdist_baseÚ plat_namerÚdist_dirÚ skip_buildÚgroupÚowner)ÚselfrrrÚinitialize_optionsQs zbdist.initialize_optionscCs²|jdur|jr tƒ|_n| d¡j|_|jdur*| d¡j}tj |d|j¡|_|  d¡|j durMz |j tj g|_ Wnt yLtdtj ƒ‚w|jdurWd|_dSdS)NÚbuildzbdist.rz;don't know how to create built distributions on platform %sÚdist)r*r,rÚget_finalized_commandr)Ú build_baseÚosÚpathÚjoinÚensure_string_listrÚdefault_formatÚnameÚKeyErrorÚDistutilsPlatformErrorr+)r/r4rrrÚfinalize_optionsZs.    ÿ   ÿÿÿ  ÿzbdist.finalize_optionsc Cs¾g}|jD]}z | |j|d¡Wqty td|ƒ‚wtt|jƒƒD]4}||}| |¡}||jvr>|j||_ |dkrJ|j |_ |j |_ |||dd…vrWd|_ |  |¡q(dS)Nrzinvalid format '%s'r&r)rr r r;ÚDistutilsOptionErrorÚrangeÚlenÚreinitialize_commandÚno_format_optionrr.r-Ú keep_tempÚ run_command)r/ÚcommandsrÚiÚcmd_nameÚsub_cmdrrrÚrunvs&   ÿ    ñz bdist.run)Ú__name__Ú __module__Ú __qualname__Ú descriptionrÚ user_optionsÚboolean_optionsrÚ help_optionsrBr9r r r0r=rIrrrrr sJÿÿñÿÿÿ÷  r ) Ú__doc__r5Údistutils.corerÚdistutils.errorsÚdistutils.utilrrr rrrrÚs