o bc9@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:)distutils.fancy_getoptrbdistformat_commandsappendformat_command print_help)rformatsformatpretty_printerr./usr/lib/python3.10/distutils/command/bdist.py show_formats s    rc @seZdZdZddddefdddd d gZd gZd d defgZdZ dddZ gdZ dddddddddZ ddZ ddZd 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_rpmgztarzip)posixnt)rpmrbztarxztarztartarrmsi)rzRPM 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) bdist_msizMicrosoft InstallercCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr) bdist_base plat_namerdist_dir skip_buildgroupowner)selfrrrinitialize_optionsOs zbdist.initialize_optionscCs|jdur|jr t|_n|dj|_|jdur*|dj}tj|d|j|_| d|j durMz |j tj g|_ Wnt yLtdtj w|jdurWd|_dSdS)Nbuildzbdist.rz;don't know how to create built distributions on platform %sdist)r(r*rget_finalized_commandr' build_baseospathjoinensure_string_listrdefault_formatnameKeyErrorDistutilsPlatformErrorr))r-r2rrrfinalize_optionsXs.         zbdist.finalize_optionsc Csg}|jD]}z ||j|dWqty td|wtt|jD]4}||}||}||jvr>|j||_ |dkrJ|j |_ |j |_ |||ddvrWd|_ | |q(dS)Nrzinvalid format '%s'r%r)rr r r9DistutilsOptionErrorrangelenreinitialize_commandno_format_optionrr,r+ keep_temp run_command)r-commandsricmd_namesub_cmdrrrrunts&       z bdist.run)__name__ __module__ __qualname__ descriptionr user_optionsboolean_optionsr help_optionsr@r7r r r.r;rGrrrrr sH  r ) __doc__r3distutils.corerdistutils.errorsdistutils.utilrrr rrrrs