grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026î   f’%ã @sêdZddlZddlZddlZddlZddlZdddgZdddddddd d„Zddddddd d„Z ddddddd d„Z d d „Z e dkræe e ƒ ƒZejeƒndS)aðModule/script to byte-compile all .py files to .pyc (or .pyo) files. When called as a script with arguments, this compiles the directories given as arguments recursively; the -l option prevents it from recursing into directories. Without arguments, if compiles all modules on sys.path, without recursing into subdirectories. (Even though it should do so for packages -- for now, you'll have to deal with packages separately.) See module py_compile for details of the actual byte-compilation. éNÚ compile_dirÚ compile_fileÚ compile_pathé Féc Cs�|stdj|ƒƒnytj|ƒ}Wn+tk r\tdj|ƒƒg}YnX|jƒd} x|D]} | dkrŒqtntjj|| ƒ} |dk rÅtjj|| ƒ} nd} tjj| ƒst | ||||||ƒs‡d} q‡qt|dkrt| tj krt| tj krttjj| ƒrttjj | ƒ rtt | |d| |||||ƒs‡d} q‡qtqtW| S)a[Byte-compile all modules in the given directory tree. Arguments (only dir is required): dir: the directory to byte-compile maxlevels: maximum recursion level (default 10) ddir: the directory that will be prepended to the path to the file as it is compiled into each byte-code file. force: if True, force compilation, even if timestamps are up-to-date quiet: if True, be quiet during compilation legacy: if True, produce legacy pyc paths instead of PEP 3147 paths optimize: optimization level or -1 for level of the interpreter zListing {!r}...zCan't list {!r}rÚ __pycache__Nr)ÚprintÚformatÚosÚlistdirÚOSErrorÚsortÚpathÚjoinÚisdirrÚcurdirÚpardirÚislinkr) ÚdirÚ maxlevelsÚddirÚforceÚrxÚquietÚlegacyÚoptimizeÚnamesÚsuccessÚnameÚfullnameÚdfile©r!ú//opt/alt/python34/lib64/python3.4/compileall.pyrs4        *%cCs d}tjj|ƒ}|dk r<tjj||ƒ} nd} |dk rj|j|ƒ} | rj|Sntjj|ƒr |r›|tr‘dnd} nL|dkrÃtjj |d| ƒ} ntjj |ƒ} tjj | ƒ} |dd…|dd…} }|dkr |s ynt tj |ƒj ƒ}tjd tjj|ƒ}t| d ƒ�}|jd ƒ}WdQX||kr‡|SWq tk rœYq Xn|s¼td j|ƒƒny"tj|| | d d|ƒ}Wn tjk rw}zt|rtdj|ƒƒntdddƒ|jjtjjddƒ}|jtjjƒ}t|ƒd}WYdd}~Xqtt tfk rí}zN|r®tdj|ƒƒntdddƒt|j!j"d|ƒd}WYdd}~XqX|dkrd}qq n|S)aßByte-compile one file. Arguments (only fullname is required): fullname: the file to byte-compile ddir: if given, the directory name compiled in to the byte-code file. force: if True, force compilation, even if timestamps are up-to-date quiet: if True, be quiet during compilation legacy: if True, produce legacy pyc paths instead of PEP 3147 paths optimize: optimization level or -1 for level of the interpreter rNÚcÚorÚdebug_overrideéz.pyz<4slÚrbézCompiling {!r}...Trz*** Error compiling {!r}...z*** ÚendÚÚerrorsÚbackslashreplaceú:éýÿÿÿr.)#r rÚbasenamerÚsearchÚisfileÚ __debug__Ú importlibÚutilÚcache_from_sourceÚdirnameÚintÚstatÚst_mtimeÚstructZpackÚ MAGIC_NUMBERÚopenÚreadr rr Ú py_compileÚcompileÚPyCompileErrorÚmsgÚencodeÚsysÚstdoutÚencodingÚdecodeÚ SyntaxErrorÚ UnicodeErrorÚ __class__Ú__name__)rrrrrrrrrr ZmoÚcfileZ cache_dirÚheadÚtailÚmtimeZexpectZchandleZactualÚokÚerrrAÚer!r!r"r@sj    !        c Cstd}xgtjD]\}| s,|tjkr?|r?tdƒq|oit||d|d|d|d|ƒ}qW|S)a{Byte-compile all module on sys.path. Arguments (all optional): skip_curdir: if true, skip current directory (default True) maxlevels: max recursion level (default 0) force: as for compile_dir() (default False) quiet: as for compile_dir() (default False) legacy: as for compile_dir() (default False) optimize: as for compile_dir() (default -1) rzSkipping current directoryNrrr)rCrr rrr)Z skip_curdirrrrrrrrr!r!r"r‹s   c Csòddl}|jddƒ}|jdddddd d d d d dƒ|jdddd dd dƒ|jdddd dd dƒ|jdddd dd dƒ|jdddd dd dd dƒ|jdddd d d dd d!ƒ|jd"dd#d d$d d%ƒ|jd&dd'd(d)d d*ƒ|jƒ}|j}|jrpddl}|j|jƒ|_n|jryX|jd+kr”t j n t |jƒ�+}x!|D]}|j |j ƒƒq­WWdQXWqtk rÿtd,j|jƒƒd-SYqXnd.}yÂ|r¨x�|D]‡}tjj|ƒrgt||j|j|j|j|jƒs d-}q qt||j|j|j|j|j|jƒsd-}qqW|Std|jd|jd|jƒSWn tk rítd/ƒd-SYnXd.S)0zScript main program.rNZ descriptionz1Utilities to support installing Python libraries.z-lÚactionZ store_constZconstÚdefaultrÚdestrÚhelpz!don't recurse into subdirectoriesz-fÚ store_truerz/force rebuild even if timestamps are up to datez-qrzoutput only error messagesz-brz0use legacy (pre-PEP3147) compiled file locationsz-dÚmetavarZDESTDIRrz�directory to prepend to file paths for use in compile-time tracebacks and in runtime tracebacks in cases where the source file is unavailablez-xZREGEXPrzskip 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Ú compile_destzFILE|DIRÚnargsÚ*zrzero or more file and directory names to compile; if no arguments given, defaults to the equivalent of -l sys.pathú-zError reading file list {}FTz [interrupted])ÚargparseÚArgumentParserÚ add_argumentÚ parse_argsrYrÚrer?rXrCÚstdinr<ÚappendÚstripr rr r rr1rrrrrrrrÚKeyboardInterrupt) r]ÚparserÚargsZ compile_destsraÚfÚlinerrTr!r!r"Úmain£sh         * !         rjÚ__main__éÿÿÿÿrlrl)Ú__doc__r rCÚimportlib.utilr3r>r:Ú__all__rrrrjrJr7Z exit_statusÚexitr!r!r!r"Ú s       * J  I