HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/distutils/__pycache__/cmd.cpython-310.opt-2.pyc
o

�i�F�@s`	ddlZddlZddlZddlmZddlmZmZmZm	Z	m
Z
ddlmZGdd�d�ZdS)�N)�DistutilsOptionError)�util�dir_util�	file_util�archive_util�dep_util��logc@s0eZdZ	gZdd�Zdd�Zdd�Zdd�Zd	d
�ZdBd
d�Z	dd�Z
dCdd�Zdd�ZdDdd�Z
dDdd�Zdd�Z	dDdd�Zdd�Zd d!�Zd"d#�Zd$d%�ZdCd&d'�ZdEd)d*�Zd+d,�Zd-d.�Zd/d0�ZdFd1d2�ZdGd4d5�Z		dHd6d7�Z		dId8d9�ZdCd:d;�ZdJd<d=�Z		dKd>d?�Z 	dLd@dA�Z!dS)M�CommandcCsd	ddlm}t||�std��|jturtd��||_|��d|_	|j
|_
d|_d|_d|_
dS)Nr)�Distributionz$dist must be a Distribution instancezCommand is an abstract class)Zdistutils.distr�
isinstance�	TypeError�	__class__r
�RuntimeError�distribution�initialize_optionsZ_dry_run�verbose�force�help�	finalized)�self�distr�r�*/usr/local/lib/python3.10/distutils/cmd.py�__init__/s



zCommand.__init__cCs6|dkrt|d|�}|durt|j|�S|St|��)N�dry_run�_)�getattrr�AttributeError)r�attrZmyvalrrr�__getattr___szCommand.__getattr__cCs|js|��d|_dS�N�)r�finalize_options�rrrr�ensure_finalizedis
zCommand.ensure_finalizedcC�	td|j���Nz,abstract method -- subclass %s must override�rrr$rrrr{�	�zCommand.initialize_optionscCr&r'r(r$rrrr#�s
�zCommand.finalize_optionsN�cCs�ddlm}|durd|��}|j||tjd�|d}|jD])\}}}|�|�}|ddkr7|dd�}t||�}|j|d||ftjd�q!dS)	Nr)�
longopt_xlatezcommand options for '%s':)�levelz  ����=z%s = %s)	Zdistutils.fancy_getoptr+�get_command_name�announcer	�INFOZuser_options�	translater)r�header�indentr+�optionr�valuerrr�dump_options�s

��zCommand.dump_optionscCr&r'r(r$rrr�run�r)zCommand.runr"cCs	t�||�dS�Nr)r�msgr,rrrr0�szCommand.announcecCs,	ddlm}|rt|�tj��dSdS)Nr)�DEBUG)Zdistutils.debugr;�print�sys�stdout�flush)rr:r;rrr�debug_print�s�zCommand.debug_printcCsBt||�}|durt|||�|St|t�std|||f��|S)Nz'%s' must be a %s (got `%s`))r�setattrr�strr)rr5�what�default�valrrr�_ensure_stringlike�s

�zCommand._ensure_stringlikecCs	|�|d|�dS)N�string)rF)rr5rDrrr�
ensure_string�szCommand.ensure_stringcCst	t||�}|durdSt|t�rt||t�d|��dSt|t�r,tdd�|D��}nd}|s8td||f��dS)Nz,\s*|\s+css�|]}t|t�VqdSr9)rrB)�.0�vrrr�	<genexpr>�s�z-Command.ensure_string_list.<locals>.<genexpr>Fz''%s' must be a list of strings (got %r))	rrrBrA�re�split�list�allr)rr5rE�okrrr�ensure_string_list�s 


���zCommand.ensure_string_listcCs:|�|||�}|dur||�std|||f��dSdS)Nzerror in '%s' option: )rFr)rr5ZtesterrCZ	error_fmtrDrErrr�_ensure_tested_string�s��zCommand._ensure_tested_stringcCs	|�|tjjdd�dS)N�filenamez$'%s' does not exist or is not a file)rR�os�path�isfile�rr5rrr�ensure_filename�s
�zCommand.ensure_filenamecCs|�|tjjdd�dS)Nzdirectory namez)'%s' does not exist or is not a directory)rRrTrU�isdirrWrrr�ensure_dirnames�zCommand.ensure_dirnamecCst|d�r|jS|jjS)N�command_name)�hasattrr[r�__name__r$rrrr/	s
zCommand.get_command_namecGsH	|j�|�}|��|D]\}}t||�dur!t||t||��q
dSr9)r�get_command_objr%rrA)rZsrc_cmdZoption_pairsZsrc_cmd_objZ
src_optionZ
dst_optionrrr�set_undefined_optionss��zCommand.set_undefined_optionscCs	|j�||�}|��|Sr9)rr^r%)r�commandZcreateZcmd_objrrr�get_finalized_command$szCommand.get_finalized_commandrcCs|j�||�Sr9)r�reinitialize_command)rr`Zreinit_subcommandsrrrrb0s�zCommand.reinitialize_commandcCs	|j�|�dSr9)r�run_command)rr`rrrrc4szCommand.run_commandcCs4	g}|jD]\}}|dus||�r|�|�q|Sr9)�sub_commands�append)r�commandsZcmd_name�methodrrr�get_sub_commands;s
�zCommand.get_sub_commandscCst�d|��|�dS)Nzwarning: %s: %s
)r	�warnr/)rr:rrrriK�zCommand.warncCstj||||jd�dS�N�r)r�executer)r�func�argsr:r,rrrrmNszCommand.execute�cCstj|||jd�dSrk)r�mkpathr)r�name�moderrrrqQrjzCommand.mkpathc	Cs 	tj|||||j||jd�Srk)r�	copy_filerr)r�infile�outfile�
preserve_mode�preserve_times�linkr,rrrrtTs


�zCommand.copy_filec	Cs 	tj||||||j|jd�Srk)r�	copy_treerr)rrurvrwrxZpreserve_symlinksr,rrrrz]s


�zCommand.copy_treecCs	tj|||jd�Srk)r�	move_filer)r�src�dstr,rrrr{fszCommand.move_filecCs"	ddlm}||||jd�dS)Nr)�spawnrl)Zdistutils.spawnr~r)r�cmdZsearch_pathr,r~rrrr~jsz
Command.spawnc	Cstj|||||j||d�S)N)r�owner�group)r�make_archiver)r�	base_name�format�root_dir�base_dirr�r�rrrr�os�zCommand.make_archivecCs�	|dur	d|}t|t�r|f}nt|ttf�std��|dur*d|d�|�f}|js3t�||�r=|�	||||�dSt
�|�dS)Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating %s from %sz, )rrBrN�tupler
�joinrrZnewer_grouprmr	�debug)rZinfilesrvrnroZexec_msgZskip_msgr,rrr�	make_fileus
�zCommand.make_file)Nr*)r"r9)rr!)rp)r"r"Nr")r"r"rr")r"r")NNNN)NNr")"r]�
__module__�__qualname__rdrr r%rr#r7r8r0r@rFrHrQrRrXrZr/r_rarbrcrhrirmrqrtrzr{r~r�r�rrrrr
sR0







�




�	
�
	

��r
)
r=rTrLZdistutils.errorsrZ	distutilsrrrrrr	r
rrrr�<module>s