a „oe ã@shdZddlZddlZddlmZddlmZmZddlm Z dd„Z Gd d „d e ƒZ Gd d „d eƒZ dS) zidistutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).éNé)ÚCommand)ÚDistutilsPlatformErrorÚDistutilsOptionError)Ú get_platformcCsPddlm}g}tjD]"}| d|dtj|df¡q||ƒ}| d¡dS)zAPrint list of available formats (arguments to "--format" option).r)Ú FancyGetoptúformats=Néz'List of available distribution formats:)Z fancy_getoptrÚbdistÚformat_commandsÚappendÚ print_help)rÚformatsÚformatZpretty_printer©rúDC:\Program Files\Certbot\pkgs\setuptools\_distutils\command\bdist.pyÚ show_formatss    rc@seZdZdd„ZdS)Ú ListCompatcCstjdtdd�dS)Nz4format_commands is now a dict. append is deprecated.r)Ú stacklevel)ÚwarningsÚwarnÚDeprecationWarning)ÚselfÚitemrrrr s ýzListCompat.appendN)Ú__name__Ú __module__Ú __qualname__r rrrrrsrc @s„eZdZdZddddeƒfdddd d gZd gZd d defgZdZ dddœZ e ddddddddœƒZ e Z dd„Zdd„Zdd „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]r z help-formatsNz$lists available distribution formats)Ú bdist_rpmÚgztarÚzip)ÚposixÚnt)r#zRPM distribution)Ú bdist_dumbzgzip'ed tar file)r(zbzip2'ed tar file)r(zxz'ed tar file)r(zcompressed tar file)r(ztar file)r(zZIP file)Zrpmr$ÚbztarÚxztarZztarÚtarr%cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)Ú bdist_baseÚ plat_namerÚdist_dirÚ skip_buildÚgroupÚowner)rrrrÚinitialize_options^szbdist.initialize_optionscCs²|jdur(|jrtƒ|_n| d¡j|_|jdurT| d¡j}tj |d|j¡|_|  d¡|j duržz|j tj g|_ Wn t yœtdtj ƒ‚Yn0|jdur®d|_dS)NÚbuildzbdist.rz;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ÚKeyErrorrr.)rr4rrrÚfinalize_optionsgs&       ÿÿ  zbdist.finalize_optionsc CsÄg}|jD]<}z| |j|d¡Wq tyDtd|ƒ‚Yq 0q tt|jƒƒD]h}||}| |¡}||jvr‚|j||_ |dkrš|j |_ |j |_ |||dd…vr´d|_ |  |¡qVdS)Nrzinvalid format '%s'r(r )rr r r:rÚrangeÚlenZreinitialize_commandÚno_format_optionrr1r0Z keep_tempZ run_command)rZcommandsrÚiZcmd_nameZsub_cmdrrrÚrunƒs"     z bdist.run)rrrÚ descriptionrZ user_optionsZboolean_optionsrZ help_optionsr>r8rr Zformat_commandr2r;r@rrrrr #sBÿýì ÿ ùÿ  r )Ú__doc__r5rZcorerÚerrorsrrÚutilrrÚdictrr rrrrÚs