
    ϶vg                         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)DistutilsOptionErrorDistutilsPlatformError)get_platformc                  ~    ddl m}  d t          j        D             } | |          }|                    d           dS )zAPrint list of available formats (arguments to "--format" option).r   )FancyGetoptc                 J    g | ] }d |z   dt           j        |         d         f!S )formats=N   )bdistformat_commands).0formats     `/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/setuptools/_distutils/command/bdist.py
<listcomp>z show_formats.<locals>.<listcomp>   sA        
f	dE$9&$A!$DE      z'List of available distribution formats:N)fancy_getoptr	   r   r   
print_help)r	   formatspretty_printers      r   show_formatsr      sa    ****** +  G ![))NGHHHHHr   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   appendz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             d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=pz8platform name to embed in generated filenames [default: ])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)r4   zbzip2'ed tar file)r4   zxz'ed tar file)r4   zcompressed tar file)r4   ztar file)r4   zZIP file)rpmr0   bztarxztarztartarr1   c                 h    d | _         d | _        d | _        d | _        d| _        d | _        d | _        d S )NF)
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                   w xY w| j        	d| _        d S d S )Nbuildzbdist.r   z9don't know how to create built distributions on platform dist)r<   r>   r   get_finalized_commandr;   
build_baseospathjoinensure_string_listr   default_formatnameKeyErrorr   r=   )r    rF   s     r   finalize_optionszbdist.finalize_optionsf   s   >! O!-!%!;!;G!D!D!N
 ?"33G<<GJ gll:x$.7PQQDO	***< $ 3BG <=   ,-#%7- -   = "DMMM ! s   -C 'C2c                    g }| j         D ]J}	 |                    | j        |         d                    *# t          $ r t	          d| d          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 ''r4   r   T)r   r"   r   rM   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   s7   l 	I 	IFI 4V <Q ?@@@@ I I I*+Gf+G+G+GHHHI 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_optionsrT   rK   r   r   format_commandrA   rN   r[   r&   r   r   r   r   $   s       8K 	U+%+ + +	
 	N	

 	S	

	
)L6 $nO 
E|TL
 &  'e44N !j03415))" "  O %N  # # #8' ' ' ' 'r   r   )__doc__rG   r   corer   errorsr   r   utilr   r   dictr   r   r&   r   r   <module>rf      s    
 
			        A A A A A A A A      	I 	I 	I
 
 
 
 
 
 
 
w' w' w' w' w'G w' w' w' w' w'r   