AlkantarClanX12

Your IP : 18.217.208.220


Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/distlib/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/distlib/__pycache__/scripts.cpython-311.pyc

�

�܋f�G�� �ddlmZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
ddlmZddlmZmZmZmZmZmZeje��Zd���Zejd	��Zd
Zd�ZeZ Gd�d
e!��Z"dS)�)�BytesION)�ZipInfo�)�	sysconfig�detect_encoding�ZipFile)�finder)�FileOperator�get_export_entry�convert_path�get_executable�get_platform�in_venva�
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
 <assemblyIdentity version="1.0.0.0"
 processorArchitecture="X86"
 name="%s"
 type="win32"/>

 <!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
 <security>
 <requestedPrivileges>
 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
 </requestedPrivileges>
 </security>
 </trustInfo>
</assembly>s^#!.*pythonw?[0-9.]*([ 	].*)?$z�# -*- coding: utf-8 -*-
import re
import sys
from %(module)s import %(import_name)s
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
c���d|vrj|�d��r;|�dd��\}}d|vr|�d��s|�d|�d�}n|�d��sd|z}|S)N� z
/usr/bin/env r�"z "z"%s")�
startswith�split)�
executable�env�_executables   �`/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/distlib/scripts.py�enquote_executabler5s���
�j���
� � ��1�1�	1�)�/�/��Q�7�7��C���k�!�!�+�*@�*@��*E�*E�!�*-�#�#�{�{�{�;�
���(�(��-�-�
1�#�j�0�
���c�8�eZdZdZeZdZ			dd�Zd�Ze	j
�d��rd�Zd	�Z
d
�Zdd�Zd
�ZeZd�Zd�ZdZd�Zdd�Zd�Zed���Zejd���Zejdksejdkrejdkrd�Zdd�Z dd�Z!dS)�ScriptMakerz_
    A class to copy or create scripts from source scripts or callable
    specifications.
    NTFc��||_||_||_d|_d|_t
jdkpt
jdkot
jdk|_td��|_
|pt|��|_t
jdkpt
jdkot
jdk|_
tj|_dS)NF�posix�java)��X.Y�nt)�
source_dir�
target_dir�
add_launchers�force�clobber�os�name�_name�set_mode�set�variantsr
�_fileop�_is_nt�sys�version_info)�selfr#r$r%�dry_run�fileops      r�__init__zScriptMaker.__init__Rs���%���$���*�����
������G�+�J���F�1B�2I�57�X��5H�	
�
��K�(�(��
��6��g�!6�!6����g��o�@�"�'�V�*;�+?�.0�h�$�.>�	
���,����rc���|�dd��r_|jrXtj�|��\}}|�dd��}tj�||��}|S)N�guiF�python�pythonw)�getr/r(�pathr�replace�join)r2r�options�dn�fns     r�_get_alternate_executablez%ScriptMaker._get_alternate_executablegsf���;�;�u�e�$�$�	.���	.��W�]�]�:�.�.�F�B�����H�i�0�0�B�����b�"�-�-�J��rrc���	t|��5}|�d��dkcddd��S#1swxYwYdS#ttf$rt�d|��YdSwxYw)zl
            Determine if the specified executable is a script
            (contains a #! line)
            �z#!NzFailed to open %sF)�open�read�OSError�IOError�logger�warning)r2r�fps   r�	_is_shellzScriptMaker._is_shellps���

��*�%�%�.���7�7�1�:�:��-�.�.�.�.�.�.�.�.�.�.�.�.����.�.�.�.�.�.���W�%�
�
�
����2�J�?�?�?��u�u�
���s,�A�7�A�;�A�;�A�,A4�3A4c���|�|��r*ddl}|jj�d��dkr|Sn)|����d��r|Sd|zS)Nrzos.name�Linuxz
jython.exez/usr/bin/env %s)rKr�lang�System�getProperty�lower�endswith)r2rrs   r�_fix_jython_executablez"ScriptMaker._fix_jython_executable|s|���~�~�j�)�)�
"������9�#�/�/�	�:�:�g�E�E�%�%�F��!�!�#�#�,�,�\�:�:�
"�!�!�$�z�1�1rc���tjdkrd}nAt|��t|��zdz}tjdkrd}nd}d|vo||k}|rd|z|zd	z}nd
}|d|z|zdzz
}|d
z
}|S)a
        Build a shebang line. In the simple case (on Windows, or a shebang line
        which is not too long or contains spaces) use a simple formulation for
        the shebang. Otherwise, use /bin/sh as the executable, with a contrived
        shebang which allows the script to run either under Python or sh, using
        suitable quoting. Thanks to Harald Nordgren for his input.

        See also: http://www.in-ulm.de/~mascheck/various/shebang/#length
                  https://hg.mozilla.org/mozilla-central/file/tip/mach
        rT��darwini�� s#!�
s
#!/bin/sh
s	'''exec' s "$0" "$@"
s' ''')r(r)�lenr0�platform)r2r�post_interp�simple_shebang�shebang_length�max_shebang_length�results       r�_build_shebangzScriptMaker._build_shebang�s����7�g���!�N�N�!��_�_�s�;�/?�/?�?�!�C�N��|�x�'�'�%(�"�"�%(�"�#�:�5�I�#1�5G�#G�
��	��Z�'�+�5��=�F�F�#�F��l�Z�/�+�=��O�O�F��h��F��
rrc��d}|jr|j}d}�n,tj��st��}�n	t	��rHt
j�tjd��dtj	d��z��}n�t
j
dkrHt
j�tj	d��dtj	d��z��}n[t
j�tj	d��dtj	d	���tj	d������}|r|�||��}tj
�d
��r|�|��}|rt!|��}|�d��}tj
dkr
d
|vr	d|vr|dz
}|�||��}	|�d��n #t($rt+d|z���wxYw|dkr;	|�|��n$#t($rt+d|�d|�d����wxYw|S)NTF�scriptszpython%s�EXEr"�BINDIRr8�VERSIONr�utf-8�cliz	-X:Framesz
-X:FullFramess
 -X:Framesz,The shebang (%r) is not decodable from utf-8z
The shebang (z-) is not decodable from the script encoding (�))rr�is_python_buildr
rr(r;r=�get_path�get_config_varr)rAr0r[rrSr�encodera�decode�UnicodeDecodeError�
ValueError)r2�encodingr\r>�enquoter�shebangs       r�_get_shebangzScriptMaker._get_shebang�s������?�	F���J��G�G��*�,�,�	F�'�)�)�J�J�
�Y�Y�	F������"�9�-�-��Y�5�e�<�<�<�>�>�J�J��w�$��� �W�\�\��,�X�6�6��)�":�5�"A�"A�B�D�D�
�
� �W�\�\��,�X�6�6�6�$-�$<�Y�$G�$G�$G�$-�$<�U�$C�$C�$C�E�F�F�
��	M��7�7�
�G�L�L�J��<�"�"�6�*�*�	A��4�4�Z�@�@�J��	8�+�J�7�7�J� �&�&�w�/�/�
��L�E�!�!�k��&D�&D�#�;�6�6��=�(�K��%�%�j�+�>�>��	&��N�N�7�#�#�#�#��!�	&�	&�	&��K�$�%�&�&�
&�	&�����w���
6����x�(�(�(�(��%�
6�
6�
6� �j�")�'�'�8�8�8�"5�6�6�6�
6�����s�'G=�=H�$H:�:!Ic��|jt|j|j�d��d|j���zS)N�.r)�module�import_name�func)�script_template�dict�prefix�suffixr)r2�entrys  r�_get_script_textzScriptMaker._get_script_text�sE���#�d��<���*�*�3�/�/��2���'�'�'��	rc�T�tj�|��}|j|zS�N)r(r;�basename�manifest)r2�exename�bases   r�get_manifestzScriptMaker.get_manifest�s$���w����(�(���}�t�#�#rc���|jo|j}tj�d��}|�|��s||z
}|s||z}�n|dkr|�d��}n|�d��}t��}	t|	d��5}
tj	�
d��}|rQtjt|����dd�}td|���}
|
�|
|��n|
�d|��ddd��n#1swxYwY|	���}||z|z}|D�]}tj�|j|��}|�r.tj�|��\}}|�d	��r|}d
|z}	|j�||���nx#t0$r�t2�d��d|z}tj�|��rtj|��tj||��|j�||��t2�d
��	tj|��n#t0$rYnwxYwYn�wxYw|jr|�d|z��s|�d|��}tj�|��r$|jst2�d|�����|j�||��|j r|j�!|g��|�"|����dS)Nrg�py�t�w�SOURCE_DATE_EPOCH�z__main__.py)�filename�	date_timez.pyz%s.exez:Failed to write executable - trying to use .deleteme logicz%s.deletemez0Able to replace executable using .deleteme logicrvzSkipping existing file %s)#r%r/r(�lineseprmrR�
_get_launcherrr�environr:�time�gmtime�intr�writestr�getvaluer;r=r$�splitextrr.�write_binary_file�	ExceptionrHrI�exists�remove�rename�debugr'r+�set_executable_mode�append)r2�namesrs�script_bytes�	filenames�ext�use_launcherr��launcher�stream�zf�source_date_epochr��zinfo�zip_datar)�outname�n�e�dfnames                    r�
_write_scriptzScriptMaker._write_script�s����)�9�d�k���*�#�#�G�,�,������(�(�	��w��G��	9�"�\�1�L�L��d�{�{��-�-�c�2�2����-�-�c�2�2���Y�Y�F����%�%�
=��$&�J�N�N�3F�$G�$G�!�$�=� $��C�0A�,B�,B� C� C�B�Q�B� G�I�#�]�.7�9�9�9�E��K�K��|�4�4�4�4��K�K�
�|�<�<�<�
=�
=�
=�
=�
=�
=�
=�
=�
=�
=�
=����
=�
=�
=�
=����(�(�H�#�g�-��8�L��"	&�"	&�D��g�l�l�4�?�D�9�9�G��
@��w�'�'��0�0���1��<�<��&�&� ��G�"�W�,����L�2�2�7�L�I�I�I�I�� �����N�N�$9�:�:�:�*�W�4�F��w�~�~�f�-�-�*��	�&�)�)�)��I�g�v�.�.�.��L�2�2�7�L�I�I�I��L�L�"3�4�4�4���	�&�)�)�)�)��$���������������� �;�7�w�'7�'7��c�	�(#�(#�7�)0���#�#�6�G��7�>�>�'�*�*��4�<���N�N�#>��H�H�H����.�.�w��E�E�E��=�@��L�4�4�g�Y�?�?�?����W�%�%�%�%�E"	&�"	&sJ� B	D5�5D9�<D9�G%�%B&J4�J!� J4�!
J.�+J4�-J.�.J4�3J4�-c�<�t��}d|jvr|�|��d|jvr$|�|�|jd����d|jvr9|�|�|j�|jd�d|jd����|S)Nr �Xrr!rvr)r,r-�addr1�variant_separator)r2r)r`s   r�get_script_filenamesz ScriptMaker.get_script_filenames9s�������
������J�J�t�����$�-����J�J���t�'8��';�';�<�=�=�=��D�M�!�!��J�J���d�4�4�d�6G��6J�6J�6J��)�!�,�,�.�
/�
/�
/��
rc��d}|rE|�dg��}|r-dd�|��z}|�d��}|�d||���}|�|���d��}|�|j��}|r|�dd��rd	}	nd
}	|�|||||	��dS)Nr�interpreter_argsz %srrg�r>r7F�pywr�)r:r=rmrtrr�r)r�)
r2r~r�r>r\�argsrs�script�scriptnamesr�s
          r�_make_scriptzScriptMaker._make_scriptEs������	3��;�;�1�2�6�6�D��
3��s�x�x��~�~�-��"�k�k�'�2�2���#�#�G�[�'�#�J�J���&�&�u�-�-�4�4�W�=�=���/�/��
�;�;���	�w�{�{�5�%�0�0�	��C�C��C����;����C�H�H�H�H�Hrc�N�d}tj�|jt	|����}tj�|jtj�|����}|js8|j�	||��st�d|��dS	t|d��}|�
��}|st�d|��dSt�|�dd����}|rd}|�d��pd	}n#t&$r
|js�d}YnwxYw|sj|r|���|j�||��|jr|j�|g��|�|��dSt�d
||j��|jjs�t7|j
��\}	}
|�d��|�|	|��}d|vrd
}nd}tj�|��}
|�|
g||���||��|r|���dSdS)NFznot copying %s (up-to-date)�rbz%s is an empty file (skipping)s
rYTrrzcopying and adjusting %s -> %srspythonwr�r�) r(r;r=r#rr$r�r&r.�newerrHr�rD�readlinerI�
FIRST_LINE_RE�matchr<�grouprGr3�close�	copy_filer+r�r��infor�seekrtr�rE)r2r�r��adjustr��f�
first_liner�r\rq�linesrsr�r�s              r�_copy_scriptzScriptMaker._copy_scriptUs���������d�o�|�F�/C�/C�D�D���'�,�,�t����0@�0@��0H�0H�I�I���z�	�$�,�"4�"4�V�W�"E�"E�	��L�L�6��?�?�?��F�
	4��V�T�"�"�A������J��
����?��H�H�H���!�'�'�
�(:�(:�7�E�(J�(J�K�K�E��
4���#�k�k�!�n�n�3������	�	�	��<�
���A�A�A�	�����	��
����	�	�	��L�"�"�6�7�3�3�3��}�
<���0�0�'��;�;�;����W�%�%�%�%�%��K�K�8�&���
)�
)�
)��<�'�	
K�"1�!�*�"=�"=���%����q�	�	�	��+�+�H�k�B�B����+�+��C�C��C��G�$�$�W�-�-���"�"�A�3�������9�c�J�J�J��
����	�	�	�	�	�
�
s�7E�E�Ec��|jjSr��r.r3)r2s rr3zScriptMaker.dry_run�s
���|�#�#rc��||j_dSr�r�)r2�values  rr3zScriptMaker.dry_run�s��$�����rr"c�@�tjd��dkrd}nd}t��dkrdnd}|�|�|�d�}t�d	d
��d}t|���|��}|sd|�d
|��}t|���|jS)N�P��64�32z	win-arm64z-armr z.exervrrzUnable to find resource z in package )	�struct�calcsizer�__name__�rsplitr	�findrp�bytes)r2�kind�bits�platform_suffixr)�distlib_package�resource�msgs        rr�zScriptMaker._get_launcher�s�����s�#�#�q�(�(������(4���+�(E�(E�f�f�2�O�#'�4������?�D�'�o�o�c�1�5�5�a�8�O��o�.�.�3�3�D�9�9�H��
&�
&����o�o�/�� ��o�o�%��>�!rc��g}t|��}|�|�||��n|�|||���|S)a�
        Make a script.

        :param specification: The specification, which is either a valid export
                              entry specification (to make a script from a
                              callable) or a filename (to make a script by
                              copying from a source location).
        :param options: A dictionary of options controlling script generation.
        :return: A list of all absolute pathnames written to.
        Nr�)rr�r�)r2�
specificationr>r�r~s     r�makezScriptMaker.make�sU���	� ��/�/���=����m�Y�7�7�7�7����e�Y���@�@�@��rc�f�g}|D]+}|�|�||�����,|S)z�
        Take a list of specifications and make scripts from them,
        :param specifications: A list of specifications.
        :return: A list of all absolute pathnames written to,
        )�extendr�)r2�specificationsr>r�r�s     r�
make_multiplezScriptMaker.make_multiple�sE���	�+�	@�	@�M����T�Y�Y�}�g�>�>�?�?�?�?��r)TFN)rNr�)"r��
__module__�__qualname__�__doc__�SCRIPT_TEMPLATErzrr5rAr0r[rrKrSrartr�_DEFAULT_MANIFESTr�r�r�r�r�r�r��propertyr3�setterr(r)r*r�r�r��rrrrIs���������&�O��J�
 $���-�-�-�-�*����|���v�&�&�2�
	�
	�
	�
	2�
	2�
	2����>F�F�F�F�P���!�H�$�$�$�:&�:&�:&�x��
�
�
�I�I�I�I� 1�1�1�f�$�$��X�$�
�^�%�%��^�%�
�w�$���2�7�f�,�,�!�x�4�/�/�	"�	"�	"�&����&	�	�	�	�	�	rr)#�ior�loggingr(�rer�r0r��zipfiler�compatrrr�	resourcesr	�utilr
rrr
rr�	getLoggerr�rH�stripr��compiler�r�r�_enquote_executable�objectrr�rr�<module>r�sz������������	�	�	�	�	�	�	�	�
�
�
�
�
�
�
�
�����������7�7�7�7�7�7�7�7�7�7�������:�:�:�:�:�:�:�:�:�:�:�:�:�:�:�:�
��	�8�	$�	$��� �u�w�w�!�&��
�=�>�>�
���
�
�
�")��{�{�{�{�{�&�{�{�{�{�{r