Your IP : 18.189.189.100


Current Path : /opt/alt/python313/lib64/python3.13/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/__pycache__/py_compile.cpython-313.opt-1.pyc

�

1}g�����SrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	/SQr
"SS\5r"SS\R5rSrSS	jrS
r\S:Xa\"5 gg)
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�(�\rSrSrSrSSjrSrSrg)r�akException 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'

c�<�URnU[La;SR[R"X55nURSSU-5nO
SU<SU<3n[RX=(d UXRU5 XPlX l	X0l
U=(d UUlg)N�zFile "<string>"z	File "%s"zSorry: z: )�__name__�SyntaxError�join�	traceback�format_exception_only�replace�	Exception�__init__�
exc_type_name�	exc_value�file�msg)�self�exc_typerrrr�tbtext�errmsgs        �1/opt/alt/python313/lib64/python3.13/py_compile.pyr�PyCompileError.__init__.s��� �)�)�
��{�"��W�W�Y�<�<��%�&�F��^�^�$5�{�T�7I�J�F�#�
)6�i�@�F����4�
�v�m�d�K�*��"���	��=�&���c��UR$)N)r)rs r�__str__�PyCompileError.__str__>s���x�x�r)rrrrN)r
)r�
__module__�__qualname__�__firstlineno__�__doc__rr�__static_attributes__�rrrrs���6!� rrc� �\rSrSrSrSrSrSrg)r�B���r&N)rr!r"r#�	TIMESTAMP�CHECKED_HASH�UNCHECKED_HASHr%r&rrrrBs���I��L��Nrrc��[RRS5(a[R$[R
$)N�SOURCE_DATE_EPOCH)�os�environ�getrr-r,r&rr�_get_default_invalidation_moder4Hs.��	�z�z�~�~�)�*�*�"�/�/�/�"�,�,�,rc���Uc
[5nUcNUS:�a)US:�aUOSn[RRUUS9nO[RRU5n[R
R
U5(aSn[URU55e[R
RU5(a@[R
RU5(dSn[URU55e[RRSU5n	U	RU5n
U	RX�=(d UUS	9n[R
R-U5nU(a[R."U5 U[0R2:Xa8U	R5U5n[R6R9X�SUS
5nOQ[RR;U
5n[R6R=UUU[0R>:H5n[R6RAU5n[R6RCUUU5 U$![adn[!UR"X�=(d U5n
US
:a5U(aU
e[$R&R)U
R*S-5 SnAgSnAff=f![a GN]f=f)aByte-compile one Python source file to Python bytecode.

:param file: The source file name.
:param cfile: The target byte compiled file name.  When not given, this
    defaults to the PEP 3147/PEP 488 location.
:param dfile: Purported file name, i.e. the file name that shows up in
    error messages.  Defaults to the source file name.
:param doraise: Flag indicating whether or not an exception should be
    raised when a compile error is found.  If an exception occurs and this
    flag is set to False, a string indicating the nature of the exception
    will be printed, and the function will return to the caller. If an
    exception occurs and this flag is set to True, a PyCompileError
    exception will be raised.
:param optimize: The optimization level for the compiler.  Valid values
    are -1, 0, 1 and 2.  A value of -1 means to use the optimization
    level of the current interpreter, as given by -O command line options.
:param invalidation_mode:
:param quiet: Return full output with False or 0, errors only with 1,
    and no output with 2.

:return: Path to the resulting byte compiled file.

Note that it isn't necessary to byte-compile Python modules for
execution efficiency -- Python itself byte-compiles a module when
it is loaded, and if it can, writes out the bytecode to the
corresponding .pyc file.

However, if a Python installation is shared between users, it is a
good idea to byte-compile all modules upon installation, since
other users may not be able to write in the source directories,
and thus they won't be able to write the .pyc file, and then
they would be byte-compiling every module each time it is loaded.
This can slow down program start-up considerably.

See compileall.py for a script/module that uses this module to
byte-compile all installed files (or all files in selected
directories).

Do note that FileExistsError is raised if cfile ends up pointing at a
non-regular file or symlink. Because the compilation uses a file renaming,
the resulting file would be regular and thus not the same type of file as
it was previously.
Nrr)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)"r4�	importlib�util�cache_from_sourcer1�path�islink�FileExistsError�format�exists�isfile�	machinery�SourceFileLoader�get_data�source_to_coderr�	__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_mode�quietr6r�loader�source_bytes�code�err�py_excrL�source_stats�bytecoderQ�modes                   rrrOsb��Z� �:�<���}��q�=�'/�1�}�8�"�L��N�N�4�4�T�BN�5�P�E��N�N�4�4�T�:�E�	�w�w�~�~�e���:���c�j�j��/�0�0�	������	�	�r�w�w�~�~�e�'<�'<�A���c�j�j��/�0�0�
�
 �
 �
1�
1�.�$�
G�F��?�?�4�(�L�
��$�$�\�=�D�/7�%�9��
��'�'�/�/�%�(����K�K�� ��/�9�9�9��(�(��.���0�0�G�G��w�'��f�)=�?�� �n�n�0�0��>���0�0�B�B���
�"5�"B�"B�
B�
��
�(�(�3�3�D�9�D�
�!�!�/�/��x��F��L��7����
�
�s�M�T�B���1�9�����
�
� � ����d�!2�3������
��
�s+�5I*�<K�*
K�4AK�K�
K)�(K)c���SSKnSnURUS9nURSSSSS9 URS	S
SS9 UR5nURS
/:Xa=[
RR5Vs/sHoDRS5PM nnOURnUHn[USS9 M gs snf![aOnUR(aURS5 SnAMJURSUR5 SnAMlSnAf[aNnUR(aURS5 SnAM�URS[U55 SnAM�SnAff=f)Nrz6A simple command-line interface for py_compile module.)�descriptionz-qz--quiet�
store_truezSuppress error output)�action�help�	filenames�+zFiles to compile)�nargsrg�-r8T)rWr))�argparse�ArgumentParser�add_argument�
parse_argsrhrI�stdin�	readlines�rstriprrrZ�exitr�OSError�str)rlrd�parser�args�filenamerh�errors       rrr�s8���J�K�
�
$�
$��
$�
=�F�
����i��
$���
�����
���
����D��~�~�#���;>�9�9�;N�;N�;P�Q�;P�x�_�_�T�*�;P�	�Q�	��N�N�	���	+��H�d�+���R���	*��z�z����A������A�u�y�y�)�)���	+��z�z����A������A�s�5�z�*�*��		+�s6�:B8�)
B=�=
E,�"D�/D�
E,�"E'�E'�'E,�__main__)NNF���Nr)r$�enum�importlib._bootstrap_externalr;�importlib.machinery�importlib.utilr1�os.pathrIr�__all__rr�Enumrr4rrrr&rr�<module>r�sv���
�$���	��
��
F��-�Y�-�`�$�)�)��-�CE�*+�^�B +�F�z���F�r

?>