Hacked By AnonymousFox

Current Path : /opt/alt/python36/lib64/python3.6/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/__pycache__/compileall.cpython-36.opt-2.pyc

3

��2a]/�@s�ddlZddlZddlZddlZddlZddlmZdddgZddd�Z	ddd�Z
ddd�Zdd
d�Zdd�Z
edkr�ee
��Zeje�dS)�N)�partial�compile_dir�compile_file�compile_path�
ccs |dkrt|tj�rtj|�}|s0tdj|��ytj|�}Wn.tk
rl|dkrdtdj|��g}YnX|j�x�|D]�}|dkr�q|tj	j
||�}|dk	r�tj	j
||�}nd}tj	j|�s�|Vq||dkr||tjkr||tj
kr|tj	j|�r|tj	j|�r|t|||d|d�EdHq|WdS)N�zListing {!r}...zCan't list {!r}�__pycache__r�)�ddir�	maxlevels�quiet)�
isinstance�os�PathLike�fspath�print�format�listdir�OSError�sort�path�join�isdir�curdir�pardir�islink�	_walk_dir)�dirr
rr�names�name�fullname�dfile�r"�//opt/alt/python36/lib64/python3.6/compileall.pyrs0


rFr	c	Cs�d}	|dk	rP|dkrtd��n2|dkrPyddlm}	Wntk
rNd}YnXt||||d�}
d}|dk	r�|dkr�|	dk	r�|p�d}|	|d��0}|jtt||||||d�|
�}
t|
dd	�}WdQRXn&x$|
D]}t|||||||�s�d
}q�W|S)Nrz%workers must be greater or equal to 0r	)�ProcessPoolExecutor)rrr
T)�max_workers)r
�force�rxr�legacy�optimize)�defaultF)	�
ValueError�concurrent.futuresr$�ImportErrorr�maprr�min)rrr
r&r'rr(r)�workersr$�files�success�executor�results�filer"r"r#r2s6


cCs�d}|dkr"t|tj�r"tj|�}tjj|�}|dk	rFtjj||�}	nd}	|dk	rd|j|�}
|
rd|Stjj|��r�|r�|d}nB|dkr�|dkr�|nd}t	j
j||d�}nt	j
j|�}tjj|�}
|dd�|dd�}}|d	k�r�|�sXyTt
tj|�j�}tjd
t	j
j|�}t|d��}|jd�}WdQRX||k�r>|SWntk
�rVYnX|�sltd
j|��ytj|||	d|d�}Wn�tjk
�r}zdd}|dk�r�|S|�r�tdj|��ntddd�|jjtjjdd�}|j tjj�}t|�WYdd}~Xn~t!t"tfk
�rv}zLd}|dk�r2|S|�rHtdj|��ntddd�t|j#j$d|�WYdd}~XnX|dk�r�d}|S)NTr�crr	�)�optimization�z.pyz<4sl�rb�zCompiling {!r}...)r)Fz*** Error compiling {!r}...z*** )�end�backslashreplace)�errors�:���r@)%r
rrrr�basenamer�search�isfile�	importlib�util�cache_from_source�dirname�int�stat�st_mtime�struct�pack�MAGIC_NUMBER�open�readrrr�
py_compile�compile�PyCompileError�msg�encode�sys�stdout�encoding�decode�SyntaxError�UnicodeError�	__class__�__name__)r r
r&r'rr(r)r2rr!�mo�cfile�opt�	cache_dir�head�tail�mtime�expect�chandle�actual�ok�errrS�er"r"r#rbsx






$
c
CsXd}xNtjD]D}|s |tjkr6|r6|dkrPtd�q|oNt||d||||d�}qW|S)NTrzSkipping current directory)rr(r))rUrrrrr)�skip_curdirrr&rr(r)r2rr"r"r#r�s

c
Cszddl}|jdd�}|jddddddd	�|jd
tddd
�|jddddd�|jdddddd�|jddddd�|jdddddd�|jd d!d"dd#d�|jd$d%d&d'd(�|jd)d*d+d,d-�|jd.d/d0td1d2�|j�}|j}|jr�ddl}|j|j�|_|j	dk	�r|j	}n|j
}|j�r�yJ|jd3k�r4tj
nt|j��$}x|D]}|j|j���qFWWdQRXWn2tk
�r�|jd4k�r�td5j|j��d6SX|jdk	�r�|j�p�d|_d7}y�|�r4xj|D]b}	tjj|	��rt|	|j|j|j|j|j��s*d6}n*t|	||j|j|j|j|j|jd8��s�d6}�q�W|St|j|j|jd9�SWn*tk
�rt|jd4k�rptd:�d6SXd7S);Nrz1Utilities to support installing Python libraries.)�descriptionz-l�store_constrrz!don't recurse into subdirectories)�action�constr*�dest�helpz-r�	recursionzhcontrol the maximum recursion level. if `-l` and `-r` options are specified, then `-r` takes precedence.)�typerorpz-f�
store_truer&z/force rebuild even if timestamps are up to date)rmrorpz-q�countrzIoutput only error messages; -qq will suppress the error messages as well.)rmror*rpz-br(z0use legacy (pre-PEP3147) compiled file locationsz-d�DESTDIRr
z�directory to prepend to file paths for use in compile-time tracebacks and in runtime tracebacks in cases where the source file is unavailable)�metavarror*rpz-x�REGEXPr'zskip files matching the regular expression; the regexp is searched for in the full path of each file considered for compilationz-i�FILE�flistzzadd all the files and directories listed in FILE to the list considered for compilation; if "-", names are read from stdin)rvrorp�compile_destzFILE|DIR�*zrzero or more file and directory names to compile; if no arguments given, defaults to the equivalent of -l sys.path)rv�nargsrpz-jz	--workersr	zRun compileall concurrently)r*rrrp�-rzError reading file list {}FT)r0)r(r&rz
[interrupted]) �argparse�ArgumentParser�add_argumentrH�
parse_argsrzr'�rerQrqrryrU�stdinrN�append�striprrrrr0rrrCrr
r&r(rr�KeyboardInterrupt)
r~�parser�args�
compile_destsr�r�f�liner2ror"r"r#�main�s~








"



r��__main__)Nrr���)rNFNrFr�r	r�)NFNrFr�r�)r	rFrFr�)rrU�importlib.utilrDrPrK�	functoolsr�__all__rrrrr�r\rH�exit_status�exitr"r"r"r#�<module>
s"


/
R
[

Hacked By AnonymousFox1.0, Coded By AnonymousFox