Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/distutils/__pycache__/util.cpython-37.opt-2.pyc

B

YI~d�O�@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)�DistutilsByteCompileErrorc
Cs�tjdkr"dtj��krdStjSdtjkr6tjdStjdksJttd�sPtjSt��\}}}}}|���	dd�}|�	d	d
�}|�	dd�}|dd�d
kr�d||fS|dd�dk�r|ddk�r�d}dt
|d�d|dd�f}ddd�}|d|tj7}n�|dd�dk�r(d|||fS|dd�dk�rfd}t�
dtj�}|�|�}|�r�|��}n>|dd�dk�r�ddl}ddl}	|�|	j��|||�\}}}d |||fS)!N�ntZamd64z	win-amd64Z_PYTHON_HOST_PLATFORM�posix�uname�/�� �_�-�Zlinuxz%s-%sZsunosr�5Zsolarisz%d.%s��Z32bitZ64bit)i���l����z.%sZaixz%s-%s.%s��cygwinz[\d.]+�darwinz%s-%s-%s)�os�name�sys�version�lower�platform�environ�hasattrr	�replace�int�maxsize�re�compile�ASCII�match�group�_osx_supportZdistutils.sysconfigZget_platform_osxZ	sysconfigZget_config_vars)
ZosnameZhost�releaser�machineZbitnessZrel_re�mr&�	distutils�r+�3/opt/alt/python37/lib64/python3.7/distutils/util.py�get_platformsD


 


r-cCs~tjdkr|S|s|S|ddkr.td|��|ddkrFtd|��|�d�}xd|krf|�d�qRW|srtjStjj|�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_path`s	


r9cCs�tjdkr<tj�|�s$tj�||�Stj�||dd��SnNtjdkr|tj�|�\}}|ddkrn|dd�}tj�||�Stdtj��dS)Nr�rr�\z!nothing known about platform '%s')rrr5�isabsr6�
splitdriver)Znew_rootr7Zdriver5r+r+r,�change_root|s

r>c	CsxtrdStjdkrZdtjkrZy$ddl}|�t���dtjd<Wnttfk
rXYnXdtjkrpt	�tjd<dadS)Nr�HOMErrZPLATr:)
�_environ_checkedrrr�pwd�getpwuid�getuid�ImportError�KeyErrorr-)rAr+r+r,�
check_environ�s	
rFc
CsTt�|fdd�}yt�d||�Stk
rN}ztd|��Wdd}~XYnXdS)NcSs,|�d�}||krt||�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')rFr!�subrEr1)�srHrI�varr+r+r,�
subst_vars�s	rM�error: cCs|t|�S)N)rG)�exc�prefixr+r+r,�grok_environment_error�srQcCs(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
rWcCs�tdkrt�|��}g}d}�x`|�r�t�||�}|��}|t|�kr\|�|d|��P||tjkr�|�|d|��||d��	�}d}n�||dkr�|d|�||dd�}|d}n�||dkr�t
�||�}n*||dkr�t�||�}ntd||��|dk�r"t
d||��|��\}}|d|�||d|d�||d�}|��d}|t|�kr"|�|�Pq"W|S)	Nrr;r:�'�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)r)rTrW�stripr$�end�len�appendrRrS�lstriprUrV�RuntimeErrorr1�span)rKZwords�posr)r[Zbegr+r+r,�split_quoted�s@


,
rbcCsP|dkr6d|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,�executes	
rlcCs2|��}|dkrdS|dkr dStd|f��dS)N)�yZyes�t�trueZon�1r:)�n�no�fZfalseZoff�0rzinvalid truth value %r)rr1)�valr+r+r,�	strtobool&srvr:cCsRddl}tjrtd��|dkr*do(|dk}|�s8yddlm}	|	d�\}
}Wn.tk
rzddlm}d|d�}
}YnXt�	d|�|s�|
dk	r�t
�|
d�}
n
t|d�}
|
�
d	�|
�
d
�tt|��d�|
�
d|||||f�|
��tjg}|�|���|�|�t||d
�tt
j|fd||d
��nddlm}�x|D]�}|dd�dk�rf�qL|dk�r�|dk�r~dn|}tjj||d�}ntj�|�}|}|�r�|dt|��|k�r�td||f��|t|�d�}|�r�t
j �||�}t
j �!|�}|�rL|�st"||��r:t�	d||�|�sH||||�nt�#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)
)rkzremoving %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_bytecoderZtempfilerwrDrxrrfr�fdopen�open�writer6�map�repr�close�
executable�extendZ"_optim_args_from_interpreter_flagsr]rrlr3�
py_compiler"�	importlib�util�cache_from_sourcer\r1r5�basenamer�debug)Zpy_files�optimize�forcerPZbase_dirrjrkZdirectr|rwZ	script_fdZscript_namerxZscript�cmdr"�file�opt�cfile�dfileZ
cfile_baser+r+r,�byte_compile6sl$


r�cCs|�d�}d}|�|�S)N�
z	
        )r2r6)�header�linesr0r+r+r,�
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)�selfrirh�kwr+r+r,�	log_error�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_errorcWstj|f|��dS)N)rrf)r�rirhr+r+r,�log_message�sz6run_2to3.<locals>.DistutilsRefactoringTool.log_messagecWstj|f|��dS)N)rr�)r�rirhr+r+r,�	log_debug�sz4run_2to3.<locals>.DistutilsRefactoringTool.log_debugN)re�
__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|	�	�Wdt�|
�X|	j
|	jdd�<|r�x(|��D]}|�
�}|s�qt|	�|�qtWg}xV|	jD]L}
tj�||
�}|tj�|��|tj�||
�|dd�}|dr�|�|�q�Wtdd�|D�|||d	�|S)
Nr)�mkpath)�	copy_file)�FileListr:)�updatecSsg|]}|���d�r|�qS)z.py)r�endswith)�.0�fnr+r+r,�
<listcomp>sz$copydir_run_2to3.<locals>.<listcomp>)r�r�r�)Zdistutils.dir_utilr�Zdistutils.file_utilr�Zdistutils.filelistr�r�getcwd�chdir�findallZallfilesr��
splitlinesrZZprocess_template_liner5r6�dirnamer]r�)�src�dest�templater�r�r�r�r�r�Zfilelistr4�lineZcopied�filenameZoutnameZresr+r+r,�copydir_run_2to3�s4
r�c@s eZdZdZdZdZdd�ZdS)�	Mixin2to3NcCst||j|j|j�S)N)r�r�r�r�)r�r�r+r+r,r�"szMixin2to3.run_2to3)rer�r�r�r�r�r�r+r+r+r,r�sr�)rN)Nrr)rrNNr:rN)NNN)NNNN)"rr!�importlib.utilr�rRrZdistutils.errorsrZdistutils.dep_utilrZdistutils.spawnrr*rrr-r9r>r@rFrMrQrTrUrVrWrbrlrvr�r�r�r�r�r+r+r+r,�<module>s>N
=




 

Hacked By AnonymousFox1.0, Coded By AnonymousFox