
    v.g!                         d Z ddlZddlZddlmZ ddlmZmZ ddlm	Z	 d Z
 G d d	e          Z G d
 de          ZdS )zidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).    N   )Command)DistutilsPlatformErrorDistutilsOptionError)get_platformc                      ddl m}  g }t          j        D ]3}|                    d|z   dt          j        |         d         f           4 | |          }|                    d           dS )zAPrint list of available formats (arguments to "--format" option).r   )FancyGetoptformats=N   z'List of available distribution formats:)fancy_getoptr	   bdistformat_commandsappend
print_help)r	   formatsformatpretty_printers       q/var/www/html/ws.service.destra.net.br/ws_env/lib/python3.11/site-packages/setuptools/_distutils/command/bdist.pyshow_formatsr      s    ******G' V V
V+T53H3PQR3STUUUU [))NGHHHHH    c                       e Zd Zd ZdS )
ListCompatc                 >    t          j        dt          d           d S )Nz4format_commands is now a dict. append is deprecated.r   )
stacklevel)warningswarnDeprecationWarning)selfitems     r   r   zListCompat.append   s.    F	
 	
 	
 	
 	
 	
r   N)__name__
__module____qualname__r    r   r   r   r      s#        
 
 
 
 
r   r   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
 edddddddd          Ze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)r+   zRPM distribution)
bdist_dumbzgzip'ed tar file)r0   zbzip2'ed tar file)r0   zxz'ed tar file)r0   zcompressed tar file)r0   ztar file)r0   zZIP file)rpmr,   bztarxztarztartarr-   c                 h    d | _         d | _        d | _        d | _        d| _        d | _        d | _        d S )Nr   )
bdist_base	plat_namer   dist_dir
skip_buildgroupowner)r   s    r   initialize_optionszbdist.initialize_options_   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)r8   r:   r   get_finalized_commandr7   
build_baseospathjoinensure_string_listr   default_formatnameKeyErrorr   r9   )r   rB   s     r   finalize_optionszbdist.finalize_optionsh   s   >! O!-!%!;!;G!D!D!N
 ?"33G<<GJ gll:x$.7PQQDO	***< $ 3BG <=   ,%')w/   = "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'r0   r   )r   r   r   rI   r   rangelenreinitialize_commandno_format_optionr   r<   r;   	keep_temprun_command)r   commandsr   icmd_namesub_cmds         r   runz	bdist.run   s1   l 	K 	KFK 4V <Q ?@@@@ K K K*+@6+IJJJK s4<(()) 	' 	'A{H//99Gt444!%a <'' $
 $
 8AEGG,,,$%!X&&&&	' 	's	   &4A)r    r!   r"   descriptionr   user_optionsboolean_optionsr   help_optionsrO   rG   r   r   format_commandr=   rJ   rV   r#   r   r   r   r   #   s        8K 	U*lnn-	
 	N	

 	S	

	
)L6 $nO 
E|TL
 &  'e44N !j47859--	
 	

 
O %N  # # #8' ' ' ' 'r   r   )__doc__rC   r   corer   errorsr   r   utilr   r   dictr   r   r#   r   r   <module>ra      s    
 
			        A A A A A A A A      I I I
 
 
 
 
 
 
 
z' z' z' z' z'G z' z' z' z' z'r   