AlkantarClanX12

Your IP : 18.223.125.236


Current Path : /opt/alt/python39/lib64/python3.9/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/distutils/__pycache__/util.cpython-39.opt-2.pyc

a

R�f�Q�@sddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd�Zd	d
�Zdd�Zd
d�Zdadd�Zdd�Zd)dd�Zdaaadd�Zdd�Zd*dd�Zdd�Zd+dd �Zd!d"�Zd,d#d$�Z d-d%d&�Z!Gd'd(�d(�Z"dS).�N)�DistutilsPlatformError)�newer)�spawn)�log)�DistutilsByteCompileErrorcCs�tjdkrFdtj��vrdSdtj��vr.dSdtj��vr@dStjSdtjvrZtjdStjd	ksnttd
�sttjSt��\}}}}}|���	dd�}|�	d
d�}|�	dd�}|dd�dkr�d||fS|dd�dk�r,|ddk�r�d}dt
|d�d|dd�f}ddd�}|d|tj7}n�|dd�dk�rPddlm
}|�S|dd �d!k�r�d!}t�d"tj�}|�|�}|�r�|��}n>|dd �d#k�r�ddl}	ddl}
|	�|
j��|||�\}}}d$|||fS)%N�ntZamd64�	win-amd64z(arm)�	win-arm32z(arm64)z	win-arm64Z_PYTHON_HOST_PLATFORM�posix�uname�/�� �_�-�Zlinuxz%s-%sZsunosr�5Zsolarisz%d.%s��Z32bitZ64bit)i���l����z.%sZaix)�aix_platform��cygwinz[\d.]+�darwinz%s-%s-%s)�os�name�sys�version�lower�platform�environ�hasattrr�replace�int�maxsizeZ_aix_supportr�re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfigZget_platform_osxZ	sysconfigZget_config_vars)ZosnameZhost�releaser�machineZbitnessrZrel_re�mr)�	distutils�r.�3/opt/alt/python39/lib64/python3.9/distutils/util.py�get_host_platformsP


 


�
r0cCs8tjdkr.dddd�}|�tj�d��p,t�St�SdS)NrZwin32rr	)Zx86Zx64ZarmZVSCMD_ARG_TGT_ARCH)rr�getrr0)ZTARGET_TO_PLATr.r.r/�get_platformbs
�r2cCsztjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|�d�}d|vrd|�d�qP|sntjStjj|�S)Nrrzpath '%s' cannot be absolute���zpath '%s' cannot end with '/'�.)r�sep�
ValueError�split�remove�curdir�path�join)�pathname�pathsr.r.r/�convert_pathms	

r>cCs�tjdkr<tj�|�s$tj�||�Stj�||dd��SnNtjdkr|tj�|�\}}|ddkrn|dd�}tj�||�Stdtj��dS)Nr
�rr�\z!nothing known about platform '%s')rrr:�isabsr;�
splitdriver)Znew_rootr<Zdriver:r.r.r/�change_root�s

rCc	CsvtrdStjdkrXdtjvrXz$ddl}|�t���dtjd<WnttfyVYn0dtjvrnt	�tjd<dadS)Nr
�HOMErrZPLATr?)
�_environ_checkedrrr�pwd�getpwuid�getuid�ImportError�KeyErrorr2)rFr.r.r/�
check_environ�s	
rKc
CsXt�|fdd�}zt�d||�WStyR}ztd|��WYd}~n
d}~00dS)NcSs,|�d�}||vrt||�Stj|SdS)Nr?)r(�strrr)r'�
local_varsZvar_namer.r.r/�_subst�s
zsubst_vars.<locals>._substz\$([a-zA-Z_][a-zA-Z_0-9]*)zinvalid variable '$%s')rKr$�subrJr6)�srMrN�varr.r.r/�
subst_vars�s	rR�error: cCs|t|�S�N)rL)�exc�prefixr.r.r/�grok_environment_error�srWcCs(t�dtj�at�d�at�d�adS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r$r%�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rer.r.r.r/�_init_regex�s
r]cCs�tdurt�|��}g}d}|�r�t�||�}|��}|t|�krZ|�|d|���q�||tjvr�|�|d|��||d��	�}d}n�||dkr�|d|�||dd�}|d}n�||dkr�t
�||�}n*||dkr�t�||�}ntd||��|du�r t
d||��|��\}}|d|�||d|d�||d�}|��d}|t|�kr|�|��q�q|S)	Nrr@r?�'�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rZr]�stripr'�end�len�appendrXrY�lstripr[r\�RuntimeErrorr6�span)rPZwords�posr,raZbegr.r.r/�split_quoted�s>

,
rhcCsP|dur6d|j|f}|dd�dkr6|dd�d}t�|�|sL||�dS)Nz%s%r���z,)r�))�__name__r�info)�func�args�msg�verbose�dry_runr.r.r/�execute s	
rrcCs2|��}|dvrdS|dvr dStd|f��dS)N)�yZyes�t�trueZon�1r?)�nZno�fZfalseZoff�0rzinvalid truth value %r)rr6)�valr.r.r/�	strtobool3sr{r?c	Csjddl}tjrtd��|dur*do(|dk}|�sVzddlm}	|	d�\}
}Wn,tyxddlm}d|d�}
}Yn0t�	d|�|�s|
dur�t
�|
d�}
n
t|d�}
|
�L|
�
d	�|
�
d
�tt|��d�|
�
d|||||f�Wd�n1�s0Ytjg}|�|���|�|�t||d
�tt
j|fd||d
��nddlm}|D]�}|dd�dk�r��qf|dk�r�|dk�r�dn|}tjj||d�}ntj�|�}|}|�r�|dt|��|k�r�td||f��|t|�d�}|�rt
j�||�}t
j� |�}|�rf|�s2t!||��rTt�	d||�|�sb||||�nt�"d||��qfdS)Nrzbyte-compiling is disabled.F)�mkstemp�.py)�mktempz$writing byte-compilation script '%s'�wz2from distutils.util import byte_compile
files = [
z,
z]
z�
byte_compile(files, optimize=%r, force=%r,
             prefix=%r, base_dir=%r,
             verbose=%r, dry_run=0,
             direct=1)
)rqzremoving %s)r%���r
)�optimizationz1invalid prefix: filename %r doesn't start with %rzbyte-compiling %s to %sz%skipping byte-compilation of %s to %s)#�
subprocessr�dont_write_bytecoderZtempfiler|rIr~rrlr�fdopen�open�writer;�map�repr�
executable�extendZ"_optim_args_from_interpreter_flagsrcrrrr8�
py_compiler%�	importlib�util�cache_from_sourcerbr6r:�basenamer�debug)Zpy_files�optimizeZforcerVZbase_dirrprqZdirectr�r|Z	script_fdZscript_namer~Zscript�cmdr%�file�opt�cfile�dfileZ
cfile_baser.r.r/�byte_compileCst$

�&
�

���r�cCs|�d�}d}|�|�S)N�
z	
        )r7r;)�header�linesr5r.r.r/�
rfc822_escape�s
r�cCsV|sdSddlm}m}Gdd�d|�}|dur8|d�}|||d�}|j|dd�dS)	Nr)�RefactoringTool�get_fixers_from_packagec@s$eZdZdd�Zdd�Zdd�ZdS)z*run_2to3.<locals>.DistutilsRefactoringToolc_stj|g|�R�dSrT)r�error)�selfrorn�kwr.r.r/�	log_error�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_errorcWstj|g|�R�dSrT)rrl�r�rornr.r.r/�log_message�sz6run_2to3.<locals>.DistutilsRefactoringTool.log_messagecWstj|g|�R�dSrT)rr�r�r.r.r/�	log_debug�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugN)rk�
__module__�__qualname__r�r�r�r.r.r.r/�DistutilsRefactoringTool�sr�z
lib2to3.fixes)�optionsT)r�)Zlib2to3.refactorr�r�Zrefactor)�files�fixer_namesr��explicitr�r�r��rr.r.r/�run_2to3�s
r�c	Csddlm}ddlm}ddlm}|�}	t��}
t�|�z|	�	�Wt�|
�nt�|
�0|	j
|	jdd�<|r�|��D]}|�
�}|s�q||	�|�q|g}|	jD]L}
tj�||
�}|tj�|��|tj�||
�|dd�}|dr�|�|�q�tdd�|D�|||d	�|S)
Nr)�mkpath)�	copy_file)�FileListr?)�updatecSsg|]}|���d�r|�qS)r})r�endswith)�.0�fnr.r.r/�
<listcomp>�z$copydir_run_2to3.<locals>.<listcomp>)r�r�r�)Zdistutils.dir_utilr�Zdistutils.file_utilr�Zdistutils.filelistr�r�getcwd�chdir�findallZallfilesr��
splitlinesr`Zprocess_template_liner:r;�dirnamercr�)�src�dest�templater�r�r�r�r�r�Zfilelistr9�lineZcopied�filenameZoutname�resr.r.r/�copydir_run_2to3�s2


�r�c@s eZdZdZdZdZdd�ZdS)�	Mixin2to3NcCst||j|j|j�SrT)r�r�r�r�)r�r�r.r.r/r�.szMixin2to3.run_2to3)rkr�r�r�r�r�r�r.r.r.r/r�sr�)rS)Nrr)rrNNr?rN)NNN)NNNN)#rr$�importlib.utilr�rXrZdistutils.errorsrZdistutils.dep_utilrZdistutils.spawnrr-rrr0r2r>rCrErKrRrWrZr[r\r]rhrrr{r�r�r�r�r�r.r.r.r/�<module>sDP
=
�


�
!