grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026B ¬5 $Dàõã @s˜ddlZddlZddlZddlZddlZddlmZdddgZddd„Z dd d„Z d d„Z ddd„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 r r Ú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 r r T)Ú max_workers)ÚforceÚrxr ÚlegacyÚoptimizeÚinvalidation_mode)ÚdefaultF) Ú ValueErrorÚconcurrent.futuresr%Ú ImportErrorrÚmaprÚ_compile_file_tupleÚminr)rr r 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_curdirr r'r r)r*r+r5rr"r"r#rÀs   c CsÒddl}|jdd�}|jddddddd �|jd td d 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_constrr z!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#ú szmain..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(ÚrerUrur r}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#Ú s*    1 T l