AlkantarClanX12

Your IP : 18.219.47.239


Current Path : /proc/self/root/opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python311/lib64/python3.11/__pycache__/py_compile.cpython-311.pyc

�

c��f�����dZddlZddlZddlZddlZddlZddlZddlZddl	Z	gd�Z
Gd�de��ZGd�dej
��Zd�Z		dd�Zd�Zed
kre��dSdS)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� �eZdZdZdd�Zd�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'

    �c�6�|j}|turBd�tj||����}|�dd|z��}nd|�d|��}t�||p||||��||_||_	||_
|p||_dS)NrzFile "<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/python311/lib64/python3.11/py_compile.pyrzPyCompileError.__init__.s��� �)�
��{�"�"��W�W�Y�<��)�%�%�&�&�F��^�^�$5�{�T�7I�J�J�F�F�#�
)6�
�
�i�i�@�F����4��
�v�m�I�d�K�K�K�*���"�����	��=�&�����c��|jS)N)r)rs r�__str__zPyCompileError.__str__>s	���x�rN)r)r
�
__module__�__qualname__�__doc__rr�rrrrsA��������6!�!�!�!� ����rrc��eZdZdZdZdZdS)r���N)r
rr�	TIMESTAMP�CHECKED_HASH�UNCHECKED_HASHr!rrrrBs�������I��L��N�N�Nrrc�p�tj�d��rtjStjS)N�SOURCE_DATE_EPOCH)�os�environ�getrr'r&r!rr�_get_default_invalidation_moder.Hs+��	�z�~�~�)�*�*�-�"�/�/�"�,�,rF���c���|�t��}|�Q|dkr,|dkr|nd}tj�||���}ntj�|��}tj�|��r$d}t|�|�����tj�	|��rCtj�
|��s$d}t|�|�����tj�d|��}	|	�
|��}
	|	�|
|p||�	��}na#t$rT}t!|j||p|��}
|d
kr+|r|
�t$j�|
jdz��Yd}~dSd}~wwxYw	tj�|��}|rt	j|��n#t$rYnwxYw|t0jkrC|	�|��}tj�||d|d
��}nNtj�|
��}tj�|||t0jk��}tj� |��}tj�!|||��|S)a�Byte-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)"r.�	importlib�util�cache_from_sourcer+�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�quietr1r�loader�source_bytes�code�err�py_excrG�source_stats�bytecoderL�modes                   rrrOs���Z� �:�<�<���}��q�=�=�'/�1�}�}�8�8�"�L��N�4�4�T�BN�5�P�P�E�E��N�4�4�T�:�:�E�	�w�~�~�e���1�:���c�j�j��/�/�0�0�0�	�����	�	�1�r�w�~�~�e�'<�'<�1�A���c�j�j��/�/�0�0�0�
�
 �
1�
1�.�$�
G�
G�F��?�?�4�(�(�L�
��$�$�\�5�=�D�/7�%�9�9����������
�s�E�M�T�B�B���1�9�9��
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�3�D�9�9�D�
�!�/�/��x��F�F�F��Ls+�?E�
F8�$A	F3�3F8�<5G2�2
G?�>G?c��ddl}d}|�|���}|�dddd���|�d	d
d���|���}|jd
gkr)d�t
j���D��}n|j}|D]�}	t|d����#t$rB}|j
r|�d��n|�d|j��Yd}~�\d}~wt$rJ}|j
r|�d��n#|�dt|����Yd}~��d}~wwxYwdS)Nrz6A simple command-line interface for py_compile module.)�descriptionz-qz--quiet�
store_truezSuppress error output)�action�help�	filenames�+zFiles to compile)�nargsrb�-c�8�g|]}|�d����S)r3)�rstrip)�.0�filenames  r�
<listcomp>zmain.<locals>.<listcomp>�s$��Q�Q�Q�x�X�_�_�T�*�*�Q�Q�QrT)rRr#)�argparse�ArgumentParser�add_argument�
parse_argsrcrD�stdin�	readlinesrrrU�exitr�OSError�str)rlr_�parser�argsrcrj�errors       rrr�s����O�O�O�J�K�
�
$�
$��
$�
=�
=�F�
����i��
$�����
�����
�����
�����D��~�#����Q�Q�3�9�;N�;N�;P�;P�Q�Q�Q�	�	��N�	��+�+��	+��H�d�+�+�+�+�+���	*�	*�	*��z�
*����A��������A�u�y�)�)�)�����������	+�	+�	+��z�
+����A��������A�s�5�z�z�*�*�*����������		+����+�+s%�#B5�5
E�?8C<�<
E�	AE�E�__main__)NNFr/Nr)r �enum�importlib._bootstrap_externalr6�importlib.machinery�importlib.utilr+�os.pathrDr
�__all__rr�Enumrr.rrr
r!rr�<module>r�s-����
����$�$�$�$���������	�	�	�	�����
�
�
�
�����
F�
F�
F��-�-�-�-�-�Y�-�-�-�`�����$�)����-�-�-�CE�*+�^�^�^�^�B +� +� +�F�z����D�F�F�F�F�F��r