???<!-- GIF89;a -->
123123123123
.....................................................................................................................................???<!-- GIF89;a -->
123123123123
.....................................................................................................................................3

  \º  ã               @   sH   d Z ddlZddlmZ ddlT ddlmZ dd„ ZG dd	„ d	eƒZdS )
zidistutils.command.bdist

Implements the Distutils 'bdist' command (create a built [binary]
distribution).é    N)ÚCommand)Ú*)Úget_platformc              C   sT   ddl m}  g }x,tjD ]"}|jd| dtj| d fƒ qW | |ƒ}|jdƒ dS )zFPrint list of available formats (arguments to "--format" option).
    r   )ÚFancyGetoptzformats=Né   z'List of available distribution formats:)Zdistutils.fancy_getoptr   ÚbdistÚformat_commandsÚappendÚformat_commandZ
print_help)r   ÚformatsÚformatZpretty_printer© r   ú//usr/lib64/python3.6/distutils/command/bdist.pyÚshow_formats   s    r   c            
   @   s–   e Zd ZdZd6dddeƒ  fd7d8d9d:d;gZdgZdd	defgZd<Z	dddœZ
dddddd d!dd"g	Zd=d>d?d@dAdBdCdDdEd/œ	Zd0d1„ Zd2d3„ Zd4d5„ Zd	S )Fr   z$create a built (binary) distributionúbdist-base=Úbú4temporary directory for creating built distributionsz
plat-name=Úpz;platform name to embed in generated filenames (default: %s)úformats=Nú/formats for distribution (comma-separated list)ú	dist-dir=Údú=directory to put final built distributions in [default: dist]ú
skip-buildú2skip rebuilding everything (for testing/debugging)úowner=Úuú@Owner name used when creating a tar file [default: current user]úgroup=ÚgúAGroup name used when creating a tar file [default: current group]zhelp-formatsz$lists available distribution formatsÚ	bdist_rpmÚgztarÚzip)ÚposixÚntÚrpmÚbztarÚxztarÚztarÚtarÚwininstÚmsiúRPM distributionÚ
bdist_dumbúgzip'ed tar fileúbzip2'ed tar fileúxz'ed tar fileúcompressed tar fileútar fileÚbdist_wininstúWindows executable installerúZIP fileÚ	bdist_msiúMicrosoft Installer)	r&   r"   r'   r(   r)   r*   r+   r#   r,   c             C   s.   d | _ d | _d | _d | _d| _d | _d | _d S )Nr   )Ú
bdist_baseÚ	plat_namer   Údist_dirÚ
skip_buildÚgroupÚowner)Úselfr   r   r   Úinitialize_optionsQ   s    zbdist.initialize_optionsc             C   s´   | j d kr(| jrtƒ | _ n| jdƒj | _ | jd krT| jdƒj}tjj|d| j  ƒ| _| j	dƒ | j
d kr y| jtj g| _
W n" tk
rž   tdtj ƒ‚Y nX | jd kr°d| _d S )NZbuildzbdist.r   z;don't know how to create built distributions on platform %sZdist)r:   r<   r   Zget_finalized_commandr9   Ú
build_baseÚosÚpathÚjoinZensure_string_listr   Údefault_formatÚnameÚKeyErrorZDistutilsPlatformErrorr;   )r?   rA   r   r   r   Úfinalize_optionsZ   s$    





zbdist.finalize_optionsc             C   sÎ   g }xH| j D ]>}y|j| j| d ƒ W q tk
rH   td| ƒ‚Y qX qW xztt| j ƒƒD ]h}|| }| j|ƒ}|| jkrŠ| j | |_	|dkr¢| j
|_
| j|_|||d d … kr¼d|_| j|ƒ q^W d S )Nr   zinvalid format '%s'r.   r   )r   r	   r
   rG   ZDistutilsOptionErrorÚrangeÚlenZreinitialize_commandÚno_format_optionr   r>   r=   Z	keep_tempZrun_command)r?   Zcommandsr   ÚiZcmd_nameZsub_cmdr   r   r   Úrunv   s"    

z	bdist.run)r   r   r   )r   Nr   )r   r   r   )r   Nr   )r   r   r   )r   r   r    )r!   )r!   r-   )r.   r/   )r.   r0   )r.   r1   )r.   r2   )r.   r3   )r4   r5   )r.   r6   )r7   r8   )Ú__name__Ú
__module__Ú__qualname__Zdescriptionr   Zuser_optionsZboolean_optionsr   Zhelp_optionsrK   rE   r   r
   r@   rH   rM   r   r   r   r   r      sJ         

 	r   )	Ú__doc__rB   Zdistutils.corer   Zdistutils.errorsZdistutils.utilr   r   r   r   r   r   r   Ú<module>   s   