Hacked By AnonymousFox

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

B

YI~d�5�	@s�ddlZddlZddlZddlZddlZddlmZdddgZddd�Z	ddd�Z
d
d�Zddd�Zddd�Z
dd�Zedkr�ee��Ze�e�dS)�N)�partial�compile_dir�compile_file�compile_path�
ccs"|dkrt|tj�rt�|�}|s0td�|��yt�|�}Wn.tk
rl|dkrdtd�|��g}YnX|��x�|D]�}|dkr�q|tj	�
||�}|dk	r�tj	�
||�}nd}tj	�|�s�||fVq||dkr||tjkr||tj
kr|tj	�|�r|tj	�|�s|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/python37/lib64/python3.7/compileall.pyrs0


rF���r	c
Cs�d}
|dk	rP|dkrtd��n2|dkrPyddlm}
Wntk
rNd}YnXt||||d�}d}|dk	r�|dkr�|
dk	r�|p�d}|
|d��0}
|
�tt||||||	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)�force�rxr�legacy�optimize�invalidation_mode)�defaultF)
�
ValueError�concurrent.futuresr%�ImportErrorr�mapr�_compile_file_tuple�minr)rrr
r'r(rr)r*�workersr+r%�files_and_ddirs�success�executor�results�filer!r"r"r#r2s6


cKs|\}}t||f|�S)N)r)�file_and_dfile�kwargsr8r!r"r"r#r1esr1c
Cs�d}|dkr"t|tj�r"t�|�}tj�|�}	|dk	rFtj�||	�}
nd}
|dk	rd|�|�}|rd|Stj�|��r�|r�|d}nB|dkr�|dkr�|nd}
t	j
j||
d�}nt	j
�|�}tj�|�}|	dd�|	dd�}}|d	k�r�|�sZyVt
t�|�j�}t�d
t	j
jd|�}t|d��}|�d�}WdQRX||k�r@|SWntk
�rXYnX|�sntd
�|��ytj|||
d||d�}Wn�tjk
�r}zbd}|dk�r�|S|�r�td�|��ntddd�|jjtjjdd�}|� tjj�}t|�Wdd}~XYn~t!t"tfk
�rz}zJd}|dk�r6|S|�rLtd�|��ntddd�t|j#j$d|�Wdd}~XYnX|dk�r�d}|S)NTr�crr	�)�optimization���z.pyz<4sll�rb�zCompiling {!r}...)r*r+Fz*** Error compiling {!r}...z*** )�end�backslashreplace)�errors�:)%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*r+r5rr!�mo�cfile�opt�	cache_dir�head�tail�mtime�expect�chandle�actual�ok�errrW�er"r"r#rjsz






$
c	CsXd}xNtjD]D}|r|tjkr4|r4|dkrPtd�q|oNt||d|||||d�}qW|S)NTrzSkipping current directory)rr)r*r+)rYrrrrr)	�skip_curdirrr'rr)r*r+r5rr"r"r#r�s
c
Cs�ddl}|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�d3d4�tjD�}|jd5t|�d6d7�|��}|j}|j	�r$ddl
}|�|j	�|_	|jdk	�r8|j}n|j
}|j�r�yJ|jd8k�rZtjnt|j��$}x|D]}|�|����qlWWdQRXWn2tk
�r�|jd9k�r�td:�|j��d;SX|jdk	�r�|j�p�d|_|j�r|j�d8d<���}	tj|	}
nd}
d=}y�|�r�xp|D]h}tj�|��rTt||j |j!|j	|j|j"|
d>��s�d;}n,t#|||j |j!|j	|j|j"|j|
d?�	�sd;}�qW|St$|j"|j!|j|
d@�SWn*t%k
�r�|jd9k�r�tdA�d;SXd=S)BNrz1Utilities 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.)�typersrtz-f�
store_truer'z/force rebuild even if timestamps are up to date)rqrsrtz-q�countrzIoutput only error messages; -qq will suppress the error messages as well.)rqrsr,rtz-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)�metavarrsr,rtz-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)rzrsrt�compile_destzFILE|DIR�*zrzero or more file and directory names to compile; if no arguments given, defaults to the equivalent of -l sys.path)rz�nargsrtz-jz	--workersr	zRun compileall concurrently)r,rvrtcSsg|]}|j���dd��qS)�_�-)r�lower�replace)�.0�moder"r"r#�
<listcomp>	szmain.<locals>.<listcomp>z--invalidation-modez�set .pyc invalidation mode; defaults to "checked-hash" if the SOURCE_DATE_EPOCH environment variable is set, and "timestamp" otherwise.)�choicesrtr�rzError reading file list {}Fr�T)r+)r3r+)r)r'rr+z
[interrupted])&�argparse�ArgumentParser�add_argumentrLrT�PycInvalidationMode�sorted�
parse_argsr~r(�rerUrurr}rY�stdinrR�append�striprrrrr3r+r��upperrrrGrr
r'r)rr�KeyboardInterrupt)
r��parser�invalidation_modes�args�
compile_destsr�r�f�line�ivl_moder+r5rsr"r"r#�main�s�









"





r��__main__)Nrr)	rNFNrFr$r	N)NFNrFr$N)r	rFrFr$N)rrY�importlib.utilrHrTrO�	functoolsr�__all__rrr1rrr�r`rL�exit_status�exitr"r"r"r#�<module>
s*


1
T
 l

Hacked By AnonymousFox1.0, Coded By AnonymousFox