AlkantarClanX12

Your IP : 18.224.63.123


Current Path : /lib64/python3.6/distutils/__pycache__/
Upload File :
Current File : //lib64/python3.6/distutils/__pycache__/util.cpython-36.opt-2.pyc

3


 \5Q�@sddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd�Zd	d
�Zdd�Zdad
d�Zdd�Zd'dd�Zdaaadd�Zdd�Zd(dd�Zdd�Zd)dd�Zdd �Zd*d!d"�Zd+d#d$�Z Gd%d&�d&�Z!dS),�N)�DistutilsPlatformError)�newer)�spawn)�log)�DistutilsByteCompileErrorcCstjdkrnd}tjj|�}|d(kr(tjStjjd|�}tj|t|�|�j�}|dkr\dS|dkrhdStjSd	tjkr�tjd	Stjd
ks�t	td�r�tjStj
�\}}}}}|j�jdd
�}|jdd�}|jdd�}|dd�dkr�d||fS|dd�dk�rV|ddk�rd}dt|d�d|dd�f}ddd�}	|d|	tj
7}n�|dd�d k�rtd||fS|dd�d!k�r�d"|||fS|dd#�d$k�r�d$}tjd%tj�}
|
j|�}|�r|j�}n>|dd#�d&k�rddl}ddl}
|j|
jj�|||�\}}}d'|||fS))N�ntz bit (��)�amd64z	win-amd64�itaniumzwin-ia64�_PYTHON_HOST_PLATFORM�posix�uname�/�� �_�-��linuxz%s-%s�sunosr�5�solarisz%d.%s���32bit�64bit)i���l����z.%s��irix�aixz%s-%s.%s��cygwinz[\d.]+�darwinz%s-%s-%s���)�os�name�sys�version�find�platform�len�lower�environ�hasattrr�replace�int�maxsize�re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfig�get_platform_osx�	sysconfig�get_config_vars)�prefix�i�j�look�osname�host�releaser'�machine�bitness�rel_re�mr6�	distutils�rF�&/usr/lib64/python3.6/distutils/util.py�get_platformsX


 


rHcCs~tjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|jd�}xd|krf|jd�qRW|srtjStjj|�S)Nrrzpath '%s' cannot be absoluterzpath '%s' cannot end with '/'�.r#)r$�sep�
ValueError�split�remove�curdir�path�join)�pathname�pathsrFrFrG�convert_pathos	


rScCs�tjdkr<tjj|�s$tjj||�Stjj||dd��SnNtjdkr|tjj|�\}}|ddkrn|dd�}tjj||�Stdtj��dS)Nr
rrr�\z!nothing known about platform '%s')r$r%rO�isabsrP�
splitdriver)Znew_rootrQZdriverOrFrFrG�change_root�s

rWcCsZtrdStjdkr<dtjkr<ddl}|jtj��dtjd<dtjkrRt�tjd<dadS)Nr
�HOMErrZPLATr)�_environ_checkedr$r%r,�pwd�getpwuid�getuidrH)rZrFrFrG�
check_environ�s	
r]cCsTt�|fdd�}ytjd||�Stk
rN}ztd|��WYdd}~XnXdS)NcSs,|jd�}||krt||�Stj|SdS)Nr)r5�strr$r,)r4�
local_varsZvar_namerFrFrG�_subst�s
zsubst_vars.<locals>._substz\$([a-zA-Z_][a-zA-Z_0-9]*)zinvalid variable '$%s')r]r1�sub�KeyErrorrK)�sr_r`�varrFrFrG�
subst_vars�s	re�error: cCs|t|�S)N)r^)�excr:rFrFrG�grok_environment_error�srhcCs(tjdtj�atjd�atjd�adS)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r1r2�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rerFrFrFrG�_init_regex�s
rncCs�tdkrt�|j�}g}d}�x`|�r�tj||�}|j�}|t|�kr\|j|d|��P||tjkr�|j|d|��||d�j	�}d}n�||dkr�|d|�||dd�}|d}n�||dkr�t
j||�}n*||dkr�tj||�}ntd||��|dk�r"t
d||��|j�\}}|d|�||d|d�||d�}|j�d}|t|�kr"|j|�Pq"W|S)	NrrTr�'�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rkrn�stripr4�endr*�appendrirj�lstriprlrm�RuntimeErrorrK�span)rcZwords�posrDrrZbegrFrFrG�split_quoted�s@


,
rxcCsP|dkr6d|j|f}|dd�dkr6|dd�d}tj|�|sL||�dS)Nz%s%rrz,)rr	���ry)�__name__r�info)�func�args�msg�verbose�dry_runrFrFrG�executes	
r�cCs2|j�}|dkrdS|dkr dStd|f��dS)N�y�yes�t�true�on�1r�n�no�f�false�off�0rzinvalid truth value %r)r�r�r�r�r�r�)r�r�r�r�r�r�)r+rK)�valrFrFrG�	strtobool0sr�rcCsTddl}tjrtd��|dkr*do(|dk}|�s8yddlm}	|	d�\}
}Wn.tk
rzddlm}d|d�}
}YnXtj	d|�|s�|
dk	r�t
j|
d�}
n
t|d�}
|
j
d	�|
j
d
jtt|��d�|
j
d|||||f�|
j�tjg}|j|j��|j|�t||d
�tt
j|fd||d
��nddlm}�x|D�]�}|dd�dk�rh�qL|dk�r�|dk�r�dn|}tjj||d�}ntjj|�}|}|�r�|dt|��|k�r�td||f��|t|�d�}|�r�t
j j||�}t
j j!|�}|�rL|�st"||��r<tj	d||�|�sJ||||�ntj#d||��qLWdS)Nrzbyte-compiling is disabled.F)�mkstempz.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)
)r�zremoving %s)r2rr)�optimizationz1invalid prefix: filename %r doesn't start with %rzbyte-compiling %s to %sz%skipping byte-compilation of %s to %s���)$�
subprocessr&�dont_write_bytecoderZtempfiler��ImportErrorr�rr{r$�fdopen�open�writerP�map�repr�close�
executable�extendZ"_optim_args_from_interpreter_flagsrsrr�rM�
py_compiler2�	importlib�util�cache_from_sourcer*rKrO�basenamer�debug)Zpy_files�optimizeZforcer:Zbase_dirrr�Zdirectr�r�Z	script_fdZscript_namer�Zscript�cmdr2�file�opt�cfile�dfileZ
cfile_baserFrFrG�byte_compile@sl$


r�cCs|jd�}d}|j|�S)N�
�rz        z	
        )rLrP)�header�linesrJrFrFrG�
rfc822_escape�s
r�cCsV|sdSddlm}m}Gdd�d|�}|dkr8|d�}|||d�}|j|dd�dS)	Nr)�RefactoringTool�get_fixers_from_packagec@s$eZdZdd�Zdd�Zdd�ZdS)z*run_2to3.<locals>.DistutilsRefactoringToolc_stj|f|��dS)N)r�error)�selfr~r}�kwrFrFrG�	log_error�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_errorcWstj|f|��dS)N)rr{)r�r~r}rFrFrG�log_message�sz6run_2to3.<locals>.DistutilsRefactoringTool.log_messagecWstj|f|��dS)N)rr�)r�r~r}rFrFrG�	log_debug�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugN)rz�
__module__�__qualname__r�r�r�rFrFrFrG�DistutilsRefactoringTool�sr�z
lib2to3.fixes)�optionsT)r�)Zlib2to3.refactorr�r�Zrefactor)�files�fixer_namesr��explicitr�r�r��rrFrFrG�run_2to3�s
r�cCsddlm}ddlm}ddlm}|�}	tj�}
tj|�z|	j	�Wdtj|
�X|	j
|	jdd�<|r�x(|j�D]}|j
�}|s�qt|	j|�qtWg}xV|	jD]L}
tjj||
�}|tjj|��|tjj||
�|dd�}|dr�|j|�q�Wtdd�|D�|||d	�|S)
Nr)�mkpath)�	copy_file)�FileListr)�updatecSsg|]}|j�jd�r|�qS)z.py)r+�endswith)�.0�fnrFrFrG�
<listcomp>sz$copydir_run_2to3.<locals>.<listcomp>)r�r�r�)Zdistutils.dir_utilr�Zdistutils.file_utilr�Zdistutils.filelistr�r$�getcwd�chdir�findallZallfilesr��
splitlinesrqZprocess_template_linerOrP�dirnamersr�)�src�dest�templater�r�r�r�r�r�ZfilelistrN�lineZcopied�filenameZoutname�resrFrFrG�copydir_run_2to3�s4
r�c@s eZdZdZdZdZdd�ZdS)�	Mixin2to3NcCst||j|j|j�S)N)r�r�r�r�)r�r�rFrFrGr�,szMixin2to3.run_2to3)rzr�r�r�r�r�r�rFrFrFrGr�sr�)rf)Nrr)rrNNrrN)NNN)NNNN)"r$r1�importlib.utilr�rir&Zdistutils.errorsrZdistutils.dep_utilrZdistutils.spawnrrErrrHrSrWrYr]rerhrkrlrmrnrxr�r�r�r�r�r�r�rFrFrFrG�<module>s>]
=