
    g                         	 d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZg dZ	 G d de
          Z G d de j                  Zd Z	 	 dd
Zd Zedk    r e             dS dS )    N)compilemainPyCompileErrorPycInvalidationModec                       e Zd Z	 ddZd ZdS )r    c                 6   |j         }|t          u rBd                    t          j        ||                    }|                    dd|z            }nd|d|}t                              | |p||||           || _        || _	        || _
        |p|| _        d S )Nr   zFile "<string>"z	File "%s"zSorry: z: )__name__SyntaxErrorjoin	tracebackformat_exception_onlyreplace	Exception__init__exc_type_name	exc_valuefilemsg)selfexc_typer   r   r   r   tbtexterrmsgs           #/usr/lib64/python3.11/py_compile.pyr   zPyCompileError.__init__.   s     ){""WWY<)% % & &F^^$5{T7IJJFF #
 )6ii@F4vmIdKKK*"	=&    c                     | j         S )N)r   )r   s    r   __str__zPyCompileError.__str__>   s	    xr   N)r   )r
   
__module____qualname__r   r    r   r   r   r      s<        6! ! ! !     r   r   c                       e Zd ZdZdZdZdS )r            N)r
   r   r   	TIMESTAMPCHECKED_HASHUNCHECKED_HASHr    r   r   r   r   B   s        ILNNNr   r   c                      t           j                            d          r+t           j                            d          st          j        S t          j        S )NSOURCE_DATE_EPOCHRPM_BUILD_ROOT)osenvirongetr   r&   r%   r    r   r   _get_default_invalidation_moder.   H   sB    

*++ -JNN+,,-"//",,r   Fc                    	 |t                      }|Q|dk    r,|dk    r|nd}t          j                            | |          }nt          j                            |           }t          j                            |          r$d}t          |                    |                    t          j        	                    |          rCt          j        
                    |          s$d}t          |                    |                    t          j                            d|           }	|	                    |           }
	 |	                    |
|p| |          }na# t          $ rT}t!          |j        ||p|           }|d	k     r+|r|t$          j                            |j        d
z              Y d }~d S d }~ww xY w	 t          j                            |          }|rt	          j        |           n# t          $ r Y nw xY w|t0          j        k    rC|	                    |           }t          j                            ||d         |d                   }nNt          j                            |
          }t          j                            |||t0          j        k              }t          j                             |           }t          j        !                    |||           |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<py_compile>)	_optimizer#   
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makedirsr   r%   
path_stats_bootstrap_external_code_to_timestamp_pycsource_hash_code_to_hash_pycr&   
_calc_mode_write_atomic)r   cfiledfiledoraiseoptimizeinvalidation_modequietr1   r   loadersource_bytescodeerrpy_excrG   source_statsbytecoderL   modes                      r   r   r   P   s   *V  :<<}q=='/1}}88"LN44TBN 5 P PEE N44T::E	w~~e 1:cjj//000			 1rw~~e'<'< 1Acjj//000 11.$GGF??4((L
$$\5=D/7 % 9 9   sEMTBB199 4
  d!2333'//%(( 	!K      /999((..0GG,w'f)=? ?  n00>>0BB"5"BB
 

 (33D99D!//xFFFLs+    E 
F9%A	F44F9=5G3 3
H ?H c                     dd l } d}|                     |          }|                    dddd           |                    d	d
d           |                                }|j        dgk    r)d t
          j                                        D             }n|j        }|D ]}	 t          |d           # t          $ rB}|j
        r|                    d           n|                    d|j                   Y d }~\d }~wt          $ rJ}|j
        r|                    d           n#|                    dt          |                     Y d }~d }~ww xY wd S )Nr   z6A simple command-line interface for py_compile module.)descriptionz-qz--quiet
store_truezSuppress error output)actionhelp	filenames+zFiles to compile)nargsrb   -c                 8    g | ]}|                     d           S )r3   )rstrip).0filenames     r   
<listcomp>zmain.<locals>.<listcomp>   s$    QQQxX__T**QQQr   T)rR   r"   )argparseArgumentParseradd_argument
parse_argsrc   rD   stdin	readlinesr   r   rU   exitr   OSErrorstr)rl   r_   parserargsrc   rj   errors          r   r   r      s   OOOJK$$$==F
i$    
     
 D~#QQ39;N;N;P;PQQQ		N	 + +	+Hd+++++ 	* 	* 	*z *AAuy))) 	+ 	+ 	+z +AAs5zz***		++ +s%   #B55
E?8C<<E	A EE__main__)NNFr/   Nr   )enumimportlib._bootstrap_externalr6   importlib.machineryimportlib.utilr+   os.pathrD   r   __all__r   r   Enumr   r.   r   r   r
   r    r   r   <module>r      s(  
  $ $ $ $         				  



    
F
F
F- - - - -Y - - -`    $)   - - - CE*+^ ^ ^ ^B +  +  +F zDFFFFF r   