grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026B ^ËùB™?ã@s¦dZddlZddlZddlZddlZddlZddlZddlZddl Z ddddgZ Gdd„de ƒZ Gdd„dej ƒZd d „Zdd d„Zddd„Zedkr¢e eƒ¡dS)zqRoutine to "compile" a .py file to a .pyc file. This module has intimate knowledge of the format of .pyc files. éNÚcompileÚmainÚPyCompileErrorÚPycInvalidationModec@s"eZdZdZddd„Zdd„ZdS) ra¯Exception raised when an error occurs while attempting to compile the file. To raise this exception, use raise PyCompileError(exc_type,exc_value,file[,msg]) where exc_type: exception type to be used in error message type name can be accesses as class variable 'exc_type_name' exc_value: exception value to be used in error message can be accesses as class variable 'exc_value' file: name of file being compiled to be used in error message can be accesses as class variable 'file' msg: string message to be written as error message If no value is given, a default exception message will be given, consistent with 'standard' py_compile output. message (or default) can be accesses as class variable 'msg' ÚcCst|j}|tkr2d t ||¡¡}| dd|¡}n d||f}t ||pJ||||¡||_||_ ||_ |pl||_ dS)NrzFile ""z File "%s"z Sorry: %s: %s) Ú__name__Ú SyntaxErrorÚjoinÚ tracebackÚformat_exception_onlyÚreplaceÚ ExceptionÚ__init__Ú exc_type_nameÚ exc_valueÚfileÚmsg)ÚselfÚexc_typerrrrÚtbtextÚerrmsg©rú//opt/alt/python37/lib64/python3.7/py_compile.pyr.s  zPyCompileError.__init__cCs|jS)N)r)rrrrÚ__str__>szPyCompileError.__str__N)r)rÚ __module__Ú __qualname__Ú__doc__rrrrrrrs c@seZdZdZdZdZdS)réééN)rrrÚ TIMESTAMPÚ CHECKED_HASHÚUNCHECKED_HASHrrrrrBscCstj d¡rtjStjSdS)NÚSOURCE_DATE_EPOCH)ÚosÚenvironÚgetrr!r rrrrÚ_get_default_invalidation_modeHs r'Féÿÿÿÿc CsÈ|dkrtƒ}|dkrL|dkr@|dkr*|nd}tjj||d�}n tj |¡}tj |¡rld}t| |¡ƒ‚n*tj  |¡r–tj  |¡s–d}t| |¡ƒ‚tj   d|¡}|  |¡} y|j| |p¼||d �} WnVtk �r} z6t| j| |pè|ƒ} |rö| ‚ntj | jd ¡dSWdd} ~ XYnXy tj |¡} | �r)Ú _optimizeÚ ÚmtimeÚsize)"r'Ú importlibÚutilÚcache_from_sourcer$ÚpathÚislinkÚFileExistsErrorÚformatÚexistsÚisfileÚ machineryÚSourceFileLoaderÚget_dataÚsource_to_coder rÚ __class__ÚsysÚstderrÚwriterÚdirnameÚmakedirsrr Ú path_statsÚ_bootstrap_externalÚ_code_to_timestamp_pycÚ source_hashÚ_code_to_hash_pycr!Ú _calc_modeÚ _write_atomic)rÚcfileÚdfileÚdoraiseÚoptimizeÚinvalidation_moder)rÚloaderÚ source_bytesÚcodeÚerrÚpy_excr?Ú source_statsÚbytecoderDÚmoderrrrOsV+            c Cs"|dkrtjdd…}d}|dgkrÄxøtj ¡}|s6P| d¡}yt|dd�Wq&tk rˆ}zd}tj d|j ¡Wdd}~XYq&t k r¼}zd}tj d|¡Wdd}~XYq&Xq&WnZxX|D]P}yt|dd�WqÊtk �r}zd}tj d|j ¡Wdd}~XYqÊXqÊW|S) a Compile several source files. The files named in 'args' (or on the command line, if 'args' is not specified) are compiled and the resulting bytecode is cached in the normal manner. This function does not search a directory structure to locate source files; it only compiles files named explicitly. If '-' is the only parameter in args, the list of files is taken from standard input. Nrrú-r+T)rJz%s ) r<ÚargvÚstdinÚreadlineÚrstriprrr=r>rÚOSError)ÚargsÚrvÚfilenameÚerrorrrrr­s0    "( (Ú__main__)NNFr(N)N)rÚenumZimportlib._bootstrap_externalr.Úimportlib.machineryÚimportlib.utilr$Zos.pathr<r Ú__all__r rÚEnumrr'rrrÚexitrrrrÚs" 0 ] &