3
\
ã @ s~ d dl Zd dlZd dlZd dlZd dlZd dlZd dlZdddgZG dd„ de ƒZ
ddd„Zd
d d„Ze
d
krzejeƒ ƒ dS )é NÚcompileÚmainÚPyCompileErrorc @ s e Zd Zddd„Zdd„ ZdS )r Ú c C st |j }|tkr2djtj||ƒƒ}|jdd| ƒ}nd||f }tj| |pJ||||ƒ || _|| _ || _
|pl|| _d S )Nr zFile ""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_typer r r r ÚtbtextÚerrmsg© r ú"/usr/lib64/python3.6/py_compile.pyr
- s
zPyCompileError.__init__c C s | j S )N)r )r r r r Ú__str__= s zPyCompileError.__str__N)r )r Ú
__module__Ú__qualname__r
r r r r r r s
Fé c C sŒ |d kr>|dkr2|dkr|nd}t jj| |d�}nt jj| ƒ}tjj|ƒr^d}t|j|ƒƒ‚n,tjj|ƒrŠtjj |ƒ rŠd}t|j|ƒƒ‚t j
jd| ƒ}|j| ƒ}y|j
||p°| |d�} W nV tk
�r }
z8t|
j|
|pÜ| ƒ}|rê|‚ntjj|jd ƒ d S W Y d d }
~
X nX y tjj|ƒ}|�r0tj|ƒ W n tk
�rH Y nX |j| ƒ}
t jj| |
d
|
d ƒ}t jj| ƒ}t jj|||ƒ |S )Nr r r )Úoptimizationzc{} is a symlink and will be changed into a regular file if import writes a byte-compiled file to itzk{} is a non-regular file and will be changed into a regular one if import writes a byte-compiled file to itz)Ú _optimizeÚ
ÚmtimeÚsize)Ú importlibÚutilÚcache_from_sourceÚosÚpathÚislinkÚFileExistsErrorÚformatÚexistsÚisfileÚ machineryÚSourceFileLoaderÚget_dataÚsource_to_coder r Ú __class__ÚsysÚstderrÚwriter ÚdirnameÚmakedirsÚ
path_statsÚ_bootstrap_externalÚ_code_to_bytecodeÚ
_calc_modeÚ
_write_atomic)r ÚcfileÚdfileÚdoraiseÚoptimizer r ÚloaderÚsource_bytesÚcodeÚerrÚpy_excr3 Úsource_statsÚbytecodeÚmoder r r r A sF )
c C s" | d krt jdd … } d}| dgkrÄxøt jjƒ }|s6P |jdƒ}yt|dd� W q& tk
rˆ } zd}t jjd|j ƒ W Y d d }~X q& t
k
r¼ } zd}t jjd| ƒ W Y d d }~X q&X