Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/scripts.cpython-312.pyc

�

4Μg\I���ddlmZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
ddlmZddlmZmZmZmZmZmZej.e�Zdj5�Zej8d	�Zd
Zej?dd�dZ ee �jCd�D�cic]4}|jDjGd
�r|jD|jH��6c}Z%d�Z&e&Z'Gd�de(�Z)ycc}w)�)�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())
�.��.exec���d|vr[|jd�r4|jdd�\}}d|vr|jd�s|�d|�d�}|S|jd�sd|z}|S)N� z
/usr/bin/env r�"z "z"%s")�
startswith�split)�
executable�env�_executables   �F/usr/local/lib/python3.12/site-packages/pip/_vendor/distlib/scripts.py�enquote_executablerGsx��
�j��
� � ��1�)�/�/��Q�7��C���k�!�+�*@�*@��*E�*-�{�;�
����(�(��-�#�j�0�
���c�N�eZdZdZeZdZ			dd�Zd�Ze	jjd�rd�Zd�Z
d�Zdd	�Zd
�ZeZd�Zd�Zd
Zd�Zdd�Zd�Zed��Zej6d��Zej:dk(sej:dk(rej<dk(rd�Zdd�Z dd�Z!y)�ScriptMakerz_
    A class to copy or create scripts from source scripts or callable
    specifications.
    Nc���||_||_||_d|_d|_t
jdk(xs(t
jdk(xrt
jdk(|_td�|_
|xst|�|_t
jdk(xs(t
jdk(xrt
jdk(|_
tj|_y)NF�posix�java)r�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__ds���%���$���*�����
�������G�+�J����F�1B�2I�57�X�X��5H�	
�
��K�(��
��6��g�!6����g�g��o�@�"�'�'�V�*;�+?�.0�h�h�$�.>�	
���,�,��rc���|jdd�r`|jrTtjj	|�\}}|jdd�}tjj
||�}|S)N�guiF�python�pythonw)�getr1r*�pathr�replace�join)r4r�options�dn�fns     r�_get_alternate_executablez%ScriptMaker._get_alternate_executableysV���;�;�u�e�$�����W�W�]�]�:�.�F�B�����H�i�0�B������b�"�-�J��rr"c���	t|�5}|jd�dk(cddd�S#1swYyxYw#ttf$rtjd|�YywxYw)zl
            Determine if the specified executable is a script
            (contains a #! line)
            �z#!NzFailed to open %sF)�open�read�OSError�IOError�logger�warning)r4r�fps   r�	_is_shellzScriptMaker._is_shell�sR��

��*�%���7�7�1�:��-�&�%�%���W�%�
����2�J�?��
�s#�7�+�	7�4�7�7�%A�Ac���|j|�r3ddl}|jjj	d�dk(r|Sd|zS|j�j
d�r|Sd|zS)Nrzos.name�Linuxz
jython.exez/usr/bin/env %s)rMr"�lang�System�getProperty�lower�endswith)r4rr"s   r�_fix_jython_executablez"ScriptMaker._fix_jython_executable�sk���~�~�j�)���9�9�#�#�/�/�	�:�g�E�%�%�%�z�1�1��!�!�#�,�,�\�:�!�!�$�z�1�1rc���tjdk7rd}n=t|�t|�zdz}tjdk(rd}nd}d|vxr||k}|r
d|z|zd	z}|Sd
}|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
        r!T��darwini�� s#!�
s
#!/bin/sh
s	'''exec' s "$0" "$@"
s' ''')r*r+�lenr2�platform)r4r�post_interp�simple_shebang�shebang_length�max_shebang_length�results       r�_build_shebangzScriptMaker._build_shebang�s����7�7�g��!�N�!��_�s�;�/?�?�!�C�N��|�|�x�'�%(�"�%(�"�#�:�5�I�#1�5G�#G�
���Z�'�+�5��=�F�
�
�$�F��l�Z�/�+�=��O�O�F��h��F��
rc��d}|jr|j}d}�n/tj�st�}�nt	�rJt
jjtjd�dtjd�z�}n�t
jdk(rJt
jjtjd�dtjd�z�}n^t
jjtjd�dtjd	��tjd����}|r|j||�}tjjd
�r|j|�}|rt!|�}|j#d�}tjdk(r
d
|vr	d|vr|dz
}|j%||�}	|j'd�|dk7r	|j'|�|S|S#t($rt+d|z��wxYw#t($rt+d|�d|�d���wxYw)NTF�scriptszpython%s�EXEr$�BINDIRr:�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+rCr2r]rrUr�encoderc�decode�UnicodeDecodeError�
ValueError)r4�encodingr^r@�enquoter�shebangs       r�_get_shebangzScriptMaker._get_shebang�s�����?�?����J��G��*�*�,�'�)�J�
�Y�������"�"�9�-��Y�5�5�e�<�<�>�J��w�w�$�� �W�W�\�\��,�,�X�6��)�":�":�5�"A�B�D�
� �W�W�\�\��,�,�X�6�$-�$<�$<�Y�$G�$-�$<�$<�U�$C�E�F�
���7�7�
�G�L�J��<�<�"�"�6�*��4�4�Z�@�J��+�J�7�J� �&�&�w�/�
��L�L�E�!�k��&D�#�;�6��=�(�K��%�%�j�+�>��	&��N�N�7�#��w��
6����x�(�
��w���"�	&��K�$�%�&�
&�	&��&�
6� �")�8�"5�6�6�
6�s�#H�:H*�H'�*Ic��|jt|j|jj	d�d|j��zS)Nrr)�module�import_name�func)�script_template�dict�prefix�suffixr)r4�entrys  r�_get_script_textzScriptMaker._get_script_textsA���#�#�d��<�<����*�*�3�/��2����'��	rc�^�tjj|�}|j|zS�N)r*r=�basename�manifest)r4�exename�bases   r�get_manifestzScriptMaker.get_manifest	s%���w�w����(���}�}�t�#�#rc��|jxr|j}tjj	d�}|j|�s||z
}|s||z}n�|dk(r|j
d�}n|j
d�}t�}	t|	d�5}
tjjd�}|rAtjt|��dd}td|��}
|
j|
|�n|
jd|�ddd�|	j!�}||z|z}|D�]E}tj"j%|j&|�}|rXtj"j)|�\}}|j+d	�r|}d
|z}	|j,j/||�n�|jr|jd|z�s|�d|��}tj"j7|�r#|j>st2j5d|���|j,j/||�|j@r|j,jC|g�|jE|���Hy#1swY��nxYw#t0$r�t2j5d�d|z}tj"j7|�rtj8|�tj:||�|j,j/||�t2j=d
�	tj8|�n#t0$rYnwxYwY��wxYw)Nri�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 logicrzSkipping existing file %s)#r'r1r*�lineseprorT�
_get_launcherrr�environr<�time�gmtime�intr�writestr�getvaluer=r?r&�splitextrr0�write_binary_file�	ExceptionrJrK�exists�remove�rename�debugr)r-�set_executable_mode�append)r4�namesru�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�k���*�*�#�#�G�,������(��w��G��"�\�1�L��d�{��-�-�c�2���-�-�c�2���Y�F����%��$&�J�J�N�N�3F�$G�!�$� $���C�0A�,B� C�B�Q� G�I�#�]�.7�9�E��K�K��|�4��K�K�
�|�<�&����(�H�#�g�-��8�L��D��g�g�l�l�4�?�?�D�9�G���w�w�'�'��0���1��<�<��&��G�"�W�,����L�L�2�2�7�L�I�"�;�;�w�'7�'7��c�	�(#�)0�#�6�G��7�7�>�>�'�*�4�<�<��N�N�#>��H�����.�.�w��E��=�=��L�L�4�4�g�Y�?����W�%�E�&�%��(!���N�N�$9�:�*�W�4�F��w�w�~�~�f�-��	�	�&�)��I�I�g�v�.��L�L�2�2�7�L�I��L�L�"3�4���	�	�&�)��$������sD�A5I7�J�7J�BM�#L9�8M�9	M�M�M�M�
M�-c�P�t�}d|jvr|j|�d|jvr"|j|�|jd���d|jvr>|j|�|j�|jd�d|jd���|S)Nr�Xrr#rr)r.r/�addr3�variant_separator)r4r+rbs   r�get_script_filenamesz ScriptMaker.get_script_filenamesKs������
������J�J�t���$�-�-���J�J��t�'8�'8��';�<�=��D�M�M�!��J�J��d�4�4�d�6G�6G��6J��)�)�!�,�.�
/��
rc�x�d}|r9|jdg�}|r%ddj|�z}|jd�}|jd||��}|j	|�jd�}|j|j�}|r|jdd�rd	}	nd
}	|j|||||	�y)Nr�interpreter_argsz %srri�r@r9F�pywr�)r<r?rorvr�r�r+r�)
r4rr�r@r^�argsru�script�scriptnamesr�s
          r�_make_scriptzScriptMaker._make_scriptWs�������;�;�1�2�6�D���s�x�x��~�-��"�k�k�'�2���#�#�G�[�'�#�J���&�&�u�-�4�4�W�=���/�/��
�
�;���w�{�{�5�%�0��C��C����;����C�Hrc��d}tjj|jt	|��}tjj|j
tjj
|��}|js3|jj||�stjd|�y	t|d�}|j�}|stjd|�ytj!|j#dd��}|rd}|j%d�xsd	}	|sh|r|j+�|jj-||�|j.r|jj1|g�|j3|�ytj5d
||j
�|jj(s�t7|j�\}	}
|j9d�|j;|	�}dvrd
}nd}tjj
|�}
|j=|
g||j?�||�|r|j+�yy#t&$r|j(s�d}Y��WwxYw)NFznot copying %s (up-to-date)�rbz%s is an empty file (skipping)s
r[Trrzcopying and adjusting %s -> %srspythonwr�r�) r*r=r?r%rr&r�r(r0�newerrJr�rF�readlinerK�
FIRST_LINE_RE�matchr>�grouprIr5�close�	copy_filer-r�r��infor�seekrvr�rG)r4r�r��adjustr��f�
first_liner�r^rs�linesrur�r�s              r�_copy_scriptzScriptMaker._copy_scriptgs����������d�o�o�|�F�/C�D���'�'�,�,�t������0@�0@��0H�I���z�z�$�,�,�"4�"4�V�W�"E��L�L�6��?��
	4��V�T�"�A�����J�����?��H��!�'�'�
�(:�(:�7�E�(J�K�E����#�k�k�!�n�3��������	��L�L�"�"�6�7�3��}�}����0�0�'��;����W�%��K�K�8�&����
)��<�<�'�'�"1�!�*�*�"=���%����q�	��+�+�H�k�B����+��C��C��G�G�$�$�W�-���"�"�A�3������9�c�J�����	���G�	��<�<���A�	�s�=I-�-J	�J	c�.�|jjSr��r0r5)r4s rr5zScriptMaker.dry_run�s���|�|�#�#�#rc�&�||j_yr�r�)r4�values  rr5zScriptMaker.dry_run�s��$����rr$c��tjd�dk(rd}nd}t�dk(rdnd}|�|�|�d�}|tvrd	|�d
t��}t|��t|S)N�P��64�32z	win-arm64z-armrrzUnable to find resource z in package )�struct�calcsizer�WRAPPERS�distlib_packagerr)r4�kind�bits�platform_suffixr+�msgs      rr�zScriptMaker._get_launcher�sa�����s�#�q�(�����(4��+�(E�f�2�O�#'���?�D��8�#��o�/�� ��o�%��D�>�!rc�t�g}t|�}|�|j||�|S|j|||��|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.
        r�)rr�r�)r4�
specificationr@r�rs     r�makezScriptMaker.make�sM���	� ��/���=����m�Y�7���
���e�Y���@��rc�Z�g}|D]#}|j|j||���%|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�)r4�specificationsr@r�r�s     r�
make_multiplezScriptMaker.make_multiple�s2���	�+�M����T�Y�Y�}�g�>�?�,��r)TFN)rNr�)"�__name__�
__module__�__qualname__�__doc__�SCRIPT_TEMPLATEr{rr7rCr2r]rrMrUrcrvr��_DEFAULT_MANIFESTr�r�r�r�r�r�r��propertyr5�setterr*r+r,r�r�r��rrrr[s����&�O��J�
 $���-�*��|�|���v�&�
	�
	2��>F�P�!�H�$�:&�x��
�I� 1�f�$��$�
�^�^�%��%�
�w�w�$��2�7�7�f�,�!�x�x�4�/�	"��&	rr)*�ior�loggingr*�rer�r2r��zipfiler�compatrrr�	resourcesr	�utilr
rrr
rr�	getLoggerr�rJ�stripr��compiler�r��rsplitr��iteratorr+rT�bytesr�r�_enquote_executable�objectr)�rs0r�<module>rs�����	�	�
�
���7�7��:�:�
��	�	�8�	$��� �u�w�!�&��
�
�=�>�
���&�/�/�#�q�)�!�,���O�
$�
-�
-�b�
1��
1���v�v���v���F�F�A�G�G�O�
1���
�")��w�&�w��7s�)9C6

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists