U .c@sHdZddlZddlmZddlTddlmZddZGdd d eZdS) zidistutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).N)Command)*) get_platformcCsPddlm}g}tjD]"}|d|dtj|dfq||}|ddS)zFPrint list of available formats (arguments to "--format" option). r) FancyGetoptformats=Nz'List of available distribution formats:)Zdistutils.fancy_getoptrbdistformat_commandsappendformat_commandZ print_help)rformatsformatZpretty_printerr}z||j|dWq tk rFtd|Yq Xq tt|jD]h}||}||}||jkr|j||_ |dkr|j |_ |j |_ |||ddkrd|_ | |qXdS)Nrzinvalid format '%s'r#r)r r r r2ZDistutilsOptionErrorrangelenZreinitialize_commandno_format_optionr r)r(Z keep_tempZ run_command)r*Zcommandsr iZcmd_nameZsub_cmdrrrrunvs"    z bdist.run)__name__ __module__ __qualname__Z descriptionrZ user_optionsZboolean_optionsrZ help_optionsr6r0r r r+r3r8rrrrrsR   r) __doc__r-Zdistutils.corerZdistutils.errorsZdistutils.utilrrrrrrrs