o
    Ëý°j1  ã                   @   sh   d Z ddlZddlmZ ddlmZ ddlmZmZ ddl	T ddl
mZ ddlmZ G d	d
„ d
eƒZdS )z·distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).é    N)ÚCommand)Úget_platform)Úremove_treeÚensure_relative)Ú*)Úget_python_version)Úlogc                	   @   s\   e Zd ZdZddddeƒ  fdddd	d
ddg	Zg d¢ZdddœZdd„ Zdd„ Z	dd„ Z
dS )Ú
bdist_dumbz"create a "dumb" built distribution)z
bdist-dir=Údz1temporary directory for creating the distributionz
plat-name=Úpz;platform name to embed in generated filenames (default: %s))zformat=Úfz>archive format to create (tar, gztar, bztar, xztar, ztar, zip))ú	keep-tempÚkzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=r
   z-directory to put final built distributions in)ú
skip-buildNz2skip rebuilding everything (for testing/debugging))ÚrelativeNz7build the archive using relative paths (default: false))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   r   r   ÚgztarÚzip)ÚposixÚntc                 C   s:   d | _ d | _d | _d| _d | _d | _d| _d | _d | _d S )Nr   )	Ú	bdist_dirÚ	plat_nameÚformatÚ	keep_tempÚdist_dirÚ
skip_buildr   ÚownerÚgroup)Úself© r    ú›/root/aizidognhua/tmp/workspace/projects/ec89d86c-575f-41c9-af57-ac45cbdbf775/venv/lib/python3.10/site-packages/setuptools/_distutils/command/bdist_dumb.pyÚinitialize_options2   s   
zbdist_dumb.initialize_optionsc                 C   st   | j d u r|  d¡j}tj |d¡| _ | jd u r0z	| jtj | _W n t	y/   t
dtj ƒ‚w |  dddd¡ d S )NÚbdistÚdumbz@don't know how to create dumb built distributions on platform %s)r   r   )r   r   )r   r   )r   Úget_finalized_commandÚ
bdist_baseÚosÚpathÚjoinr   Údefault_formatÚnameÚKeyErrorÚDistutilsPlatformErrorÚset_undefined_options)r   r&   r    r    r!   Úfinalize_options=   s$   

ÿÿÿýzbdist_dumb.finalize_optionsc                 C   s(  | j s|  d¡ | jddd�}| j|_| j |_ d|_t d| j¡ |  d¡ d| j 	¡ | j
f }tj | j|¡}| js?| j}n$| j ¡ rX|j|jkrXtdt|jƒt|jƒf ƒ‚tj | jt|jƒ¡}| j|| j|| j| jd	�}| j ¡ rytƒ }nd
}| jj d||f¡ | js’t| j| jd� d S d S )NÚbuildÚinstallé   )Úreinit_subcommandsr   zinstalling to %sz%s.%szScan't make a dumb built distribution where base and platbase are different (%s, %s))Úroot_dirr   r   Úanyr	   )Údry_run) r   Úrun_commandÚreinitialize_commandr   ÚrootÚwarn_dirr   ÚinfoÚdistributionÚget_fullnamer   r'   r(   r)   r   r   Úhas_ext_modulesÚinstall_baseÚinstall_platbaser-   Úreprr   Úmake_archiver   r   r   r   Ú
dist_filesÚappendr   r   r6   )r   r1   Úarchive_basenameÚpseudoinstall_rootÚarchive_rootÚfilenameÚ	pyversionr    r    r!   ÚrunO   sN   


ÿ
ÿþÿ
ÿþ
ÿÿzbdist_dumb.runN)Ú__name__Ú
__module__Ú__qualname__Údescriptionr   Úuser_optionsÚboolean_optionsr*   r"   r/   rJ   r    r    r    r!   r	      s.    ÿÿëÿr	   )Ú__doc__r'   Údistutils.corer   Údistutils.utilr   Údistutils.dir_utilr   r   Údistutils.errorsÚdistutils.sysconfigr   Ú	distutilsr   r	   r    r    r    r!   Ú<module>   s    