grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a XC?h‰Nã @sºddlZddlZddlZddlZddlZddlZddlmZddl m Z gd¢Z ddd„Z dddddd œd d „Z dddddd œd d„Zddd„Zdd„Zedkr¶eeƒ ƒZe e¡dS)éN)Úpartial)ÚPath)Ú compile_dirÚ compile_fileÚ compile_pathccsú|dkrt|tjƒrt |¡}|s0td |¡ƒzt |¡}Wn,tyj|dkrbtd |¡ƒg}Yn0| ¡|D]|}|dkr†qxtj   ||¡}tj   |¡s¨|Vqx|dkrx|tj krx|tj krxtj   |¡rxtj  |¡sxt||d|d�EdHqxdS)NézListing {!r}...zCan't list {!r}Ú __pycache__ré)Ú maxlevelsÚquiet)Ú isinstanceÚosÚPathLikeÚfspathÚprintÚformatÚlistdirÚOSErrorÚsortÚpathÚjoinÚisdirÚcurdirÚpardirÚislinkÚ _walk_dir)Údirr r ÚnamesÚnameÚfullname©r ú//opt/alt/python39/lib64/python3.9/compileall.pyrs2     ÿ ÿ ÿrFéÿÿÿÿr ©ÚstripdirÚ prependdirÚ limit_sl_destÚhardlink_dupesc CsNd}|dur$| dus| dur$tdƒ‚|dur8|} |} d}|dkrHtdƒ‚|dkrxzddlm}Wntyvd}Yn0|durˆt ¡}t|||d�}d}|dk�r|du�r|p´d}||d��D}| tt ||||||| | | | | d � |¡}t |dd �}Wdƒn1�s 0Yn2|D],}t |||||||| | | | | d � �sd }�q|S) NúPDestination dir (ddir) cannot be used in combination with stripdir or prependdirrz%workers must be greater or equal to 0r )ÚProcessPoolExecutor)r r T)Z max_workers) ÚddirÚforceÚrxr ÚlegacyÚoptimizeÚinvalidation_moder$r%r&r')Údefaultr#F) Ú ValueErrorZconcurrent.futuresr)Ú ImportErrorÚsysÚgetrecursionlimitrÚmaprrÚmin)rr r*r+r,r r-r.Úworkersr/r$r%r&r'r)ÚfilesÚsuccessZexecutorZresultsÚfiler r r!r0sX   ÷ ö . ürc& Cs„|dur |dus| dur tdƒ‚d} |dkrBt|tjƒrBt |¡}tj |¡} d}|durhtj || ¡}|durÆ| tjj ¡}| tjj ¡}t |ƒ}t ||ƒD]\}}||krž|  |¡qžtjj|Ž}| durô|durætj | |¡}ntj | |¡}t|t ƒ�r|g}tt|ƒƒ}| �r.t|ƒdk�r.tdƒ‚|du�rL| |¡}|�rL| S| du�r„tj |¡�r„t| ƒ ¡t|ƒ ¡jv�r„| Si}tj |¡�r€|D]d}|�r²|d||<nJ|dk�rè|dk�rÊ|nd}tjj||d �}|||<ntj |¡}|||<�qš| dd …| d d…}}|d k�r€|�sÈzˆt t |¡jƒ}t d tjjd|d @¡}| ¡D]L}t |dƒ�}| !d¡}Wdƒn1�sŒ0Y||k�r\�q°�q\| WSWnt"�yÆYn0|�sÜt#d $|¡ƒz€t%|ƒD]p\}}||}t&j'|||d||d�} |dk�ræ| �ræ|||d}!t(j)||!dd��ræt *|¡t +|!|¡�qæW�nt&j,�yô}"z|d} |dk�rŽ| WYd}"~"S|�r¤t#d $|¡ƒn t#ddd�t-j.j/�pÀt- 0¡}#|"j1j2|#dd� 3|#¡}$t#|$ƒWYd}"~"n”d}"~"0t4t5t"f�yp}%z^d} |dk�r(| WYd}%~%S|�r>t#d $|¡ƒn t#ddd�t#|%j6j7d|%ƒWYd}%~%nd}%~%00| dk�r€d} | S)Nr(TrzXHardlinking of duplicated bytecode makes sense only for more than one optimization levelÚcrr Ú)Ú optimizationéýÿÿÿz.pyz<4sLLlÿÿÚrbé zCompiling {!r}...)r.r/F)Zshallowz*** Error compiling {!r}...z*** )ÚendÚbackslashreplace)Úerrorsú:)8r1r r rrrÚbasenamerÚsplitÚsepÚlistÚzipÚremoveÚintÚsortedÚsetÚlenÚsearchrrZresolveÚparentsÚisfileÚ importlibÚutilÚcache_from_sourceÚstatÚst_mtimeÚstructZpackÚ MAGIC_NUMBERÚvaluesÚopenÚreadrrrÚ enumerateÚ py_compileÚcompileÚfilecmpZcmpÚunlinkÚlinkÚPyCompileErrorr3ÚstdoutÚencodingÚgetdefaultencodingÚmsgÚencodeÚdecodeÚ SyntaxErrorÚ UnicodeErrorÚ __class__Ú__name__)&rr*r+r,r r-r.r/r$r%r&r'r9rÚdfileZfullname_partsZstripdir_partsZ ddir_partsZspartZopartZmoZ opt_cfilesÚ opt_levelÚoptÚcfileÚheadÚtailÚmtimeZexpectZchandleZactualÚindexÚokZprevious_cfileÚerrrdrfÚer r r!r{s         ÿ     ÿ  *    þ     ( rc CsTd}tjD]D}|r|tjkr2|r2|dkrNtdƒq |oLt||d|||||d�}q |S)NTrzSkipping current directory)r r-r.r/)r3rr rrr) Z skip_curdirr r+r r-r.r/r9rr r r!rs   ø rc CsÈddl}|jdd�}|jddddddd�|jd td d d �|jd dddd�|jdddddd�|jddddd�|jdddddd�|jdd d!dd"d�|jd#d$d%dd&d�|jd'd(d)dd*d�|jd+d,d-d.d/�|jd0d1d2d3d4�|jd5d6d7td8d9�d:d;„tjDƒ}|jd�|jd?d@tdAdBdC�|jdDdEdFdGd/�|jdHddIdJd�| ¡}|j}|j �r„ddl }|  |j ¡|_ |j dKk�r–d|_ |j du�rª|j }n|j}|jdu�rÄdLg|_t|jƒd7k�ræ|j�ræ| dM¡|jdu�r|jdu�s |jdu�r| dN¡|j�r¬z\|jdOk�r0tjnt|jƒ�*}|D]}| | ¡¡�q@Wdƒn1�sl0YWn2t�yª|jdPk�r¤tdQ |j¡ƒYdRS0|j �rÒ|j  !dOdS¡ "¡} tj| } nd} dT} z¾|�r~|D]�} t#j$ %| ¡�r4t&| |j|j'|j |j|j(| |j|j|j|j |jdU� �stdR} n@t)| ||j|j'|j |j|j(|j*| |j|j|j|j |jdV��sædR} �qæ| WSt+|j(|j'|j| dW�WSWn*t,�yÂ|jdPk�r¼tdXƒYdRS0dTS)YNrz1Utilities to support installing Python libraries.)Z descriptionz-lZ store_constr z!don't recurse into subdirectories)ÚactionZconstr0ÚdestÚhelpz-rÚ recursionzhcontrol the maximum recursion level. if `-l` and `-r` options are specified, then `-r` takes precedence.)Útyperyrzz-fÚ store_truer+z/force rebuild even if timestamps are up to date)rxryrzz-qÚcountr zIoutput only error messages; -qq will suppress the error messages as well.)rxryr0rzz-br-z0use legacy (pre-PEP3147) compiled file locationsz-dZDESTDIRr*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)Úmetavarryr0rzz-sZSTRIPDIRr$z€part of path to left-strip from path to source file - for example buildroot. `-d` and `-s` options cannot be specified together.z-pZ PREPENDDIRr%z®path to add as prefix to path to source file - for example / to make it absolute when some part is removed by `-s` option. `-d` and `-p` options cannot be specified together.z-xZREGEXPr,zskip files matching the regular expression; the regexp is searched for in the full path of each file considered for compilationz-iZFILEÚflistzzadd all the files and directories listed in FILE to the list considered for compilation; if "-", names are read from stdin)rryrzÚ compile_destzFILE|DIRÚ*zrzero or more file and directory names to compile; if no arguments given, defaults to the equivalent of -l sys.path)rÚnargsrzz-jz --workersr zRun compileall concurrently)r0r|rzcSsg|]}|j ¡ dd¡‘qS)Ú_ú-)rÚlowerÚreplace)Ú.0Úmoder r r!Ú gsÿzmain..z--invalidation-modez‡set .pyc invalidation mode; defaults to "checked-hash" if the SOURCE_DATE_EPOCH environment variable is set, and "timestamp" otherwise.)Úchoicesrzz-oÚappendÚ opt_levelsz‡Optimization levels to run compilation with. Default is -1 which uses the optimization level of the Python interpreter itself (see -O).)rxr|ryrzz-eZDIRr&z+Ignore symlinks pointing outsite of the DIRz--hardlink-dupesr'zHardlink duplicated pyc filesr<r"zYHardlinking of duplicated bytecode makes sense only for more than one optimization level.z.-d cannot be used in combination with -s or -pr…rzError reading file list {}Fr„T)r/r$r%r.r&r')r7r/r$r%r.r&r')r-r+r r/z [interrupted])-ÚargparseÚArgumentParserÚ add_argumentrKr]ÚPycInvalidationModerLÚ parse_argsr�r,Úrer^r&r{r r�rNr'Úerrorr*r$r%r€r3ÚstdinrZrŒÚstriprr rrr/r‡Úupperr rrQrr+r-rr7rÚKeyboardInterrupt) rŽÚparserZinvalidation_modesÚargsZ compile_destsr“r ÚfÚlineZivl_moder/r9ryr r r!Úmain2sÿ þ ÿ ÿ ÿ ÿ ÿ þ þ ÿ ÿ ÿ ÿÿþ ÿ ÿþ     ÿÿ 6  ù  ø  þ  r�Ú__main__)r) NNFNrFr"r N)NFNrFr"N)r rFrFr"N)r r3Úimportlib.utilrRr]rWr_Ú functoolsrÚpathlibrÚ__all__rrrrr�rlrKZ exit_statusÚexitr r r r!Ú sB   þý Kþý þ "