B 0c@sDddlZddlmZddlTddlmZddZGdddeZdS) N)Command)*) get_platformcCsTddlm}g}x,tjD]"}|d|dtj|dfqW||}|ddS)Nr) FancyGetoptzformats=z'List of available distribution formats:)Zdistutils.fancy_getoptrbdistformat_commandsappendformat_command print_help)rformatsformatZpretty_printerr}y||j|dWq tk rHtd|Yq Xq Wxztt|jD]h}||}||}||jkr|j||_ |dkr|j |_ |j |_ |||ddkrd|_ | |q^WdS)Nrzinvalid format '%s'r"r)r r r r1ZDistutilsOptionErrorrangelenZreinitialize_commandno_format_optionr r(r'Z keep_tempZ run_command)r)Zcommandsr iZcmd_nameZsub_cmdrrrrunvs"    z bdist.run)__name__ __module__ __qualname__ descriptionrZ user_optionsZboolean_optionsrZ help_optionsr5r/rr r*r2r7rrrrrs<    r)r,Zdistutils.corerZdistutils.errorsZdistutils.utilrrrrrrrs