
    d                     T    d Z ddlZddlmZ ddlT ddlmZ d Z G d de          ZdS )	zidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).    N)Command)*)get_platformc                      ddl m}  g }t          j        D ]3}|                    d|z   dt          j        |         d         f           4 | |          }|                    d           dS )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_printers       )  /croot/python-split_1694437901252/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.11/distutils/command/bdist.pyshow_formatsr      s     322222G' : :
V+T,V4Q79 	: 	: 	: 	: [))NGHHHHH    c                       e Zd ZdZdddd e            z  fdddd	d
gZdgZdddefgZdZ	dddZ
g dZddddddddZd Zd Zd Zd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))r   Nz/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))zowner=uz@Owner name used when creating a tar file [default: current user])zgroup=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)rpmr   bztarxztarztartarr   )r   zRPM distribution)
bdist_dumbzgzip'ed tar file)r'   zbzip2'ed tar file)r'   zxz'ed tar file)r'   zcompressed tar file)r'   ztar file)r'   zZIP filec                 h    d | _         d | _        d | _        d | _        d| _        d | _        d | _        d S )Nr   )
bdist_base	plat_namer   dist_dir
skip_buildgroupowner)selfs    r   initialize_optionszbdist.initialize_optionsL   s7    



r   c                    | j         :| j        rt                      | _         n|                     d          j         | _         | j        G|                     d          j        }t          j                            |d| j         z             | _        | 	                    d           | j
        I	 | j        t          j                 g| _
        n*# t          $ r t          dt          j        z            w xY w| j        	d| _        d S d S )Nbuildzbdist.r   z;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/   r5   s     r   finalize_optionszbdist.finalize_optionsU   s   >! O!-!%!;!;G!D!D!N
 ?"33G<<GJ gll:+3dn+DF FDO 		***<2 $ 3BG <= 2 2 2,')+12 2 22
 = "DMMM ! s   -C 'C2c                    g }| j         D ]I}	 |                    | j        |         d                    *# t          $ r t	          d|z            w xY wt          t          | j                             D ]}||         }|                     |          }|| j        vr| j         |         |_	        |dk    r| j
        |_
        | j        |_        |||dz   d          v rd|_        |                     |           d S )Nr   zinvalid format '%s'r'   r	   )r   r   r   r<   DistutilsOptionErrorrangelenreinitialize_commandno_format_optionr   r.   r-   	keep_temprun_command)r/   commandsr   icmd_namesub_cmds         r   runz	bdist.runq   s0   l 	K 	KFK 3F ;A >???? K K K*+@6+IJJJK s4<(()) 	' 	'A{H//99Gt444!%a <'' $
 $
 8AaCDD>))$%!X&&&&	' 	's	   &4A)__name__
__module____qualname__descriptionr   user_optionsboolean_optionsr   help_optionsrD   r:   r   r   r0   r>   rK    r   r   r   r      s        8KM!3%'3|~~67H(K12L( $nO 
	/	?
L &  '!# #N ONNO  BAB?D99 N  # # #8' ' ' ' 'r   r   )	__doc__r6   distutils.corer   distutils.errorsdistutils.utilr   r   r   rS   r   r   <module>rX      s    
 
			 " " " " " "     ' ' ' ' ' '	I 	I 	Ir' r' r' r' r'G r' r' r' r' r'r   