Your IP : 18.217.14.208


Current Path : /opt/alt/python311/lib64/python3.11/venv/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/venv/__pycache__/__init__.cpython-311.opt-2.pyc

�

c��f=b��0�	ddlZddlZddlZddlZddlZddlZddlZdZeje	��Z
Gd�d��Z		dd�Zd
d�Z
e	dkrId	Z	e
��dZn'#e$rZed
ezej���YdZ[ndZ[wwxYweje��dSdS)�N)�pip�
setuptoolsc��eZdZ				dd�Zd�Zd�Zd�Zd�Zd�Ze	j
d	krdd
�Zndd�Zd�Zd
�Z
d�Zd�Zd�Zd�Zd�Zd�ZdS)�
EnvBuilderFNc���||_||_||_||_||_||_|dkr0tj�t
j	����}||_
||_dS)N�.)�system_site_packages�clear�symlinks�upgrade�with_pip�orig_prompt�os�path�basename�getcwd�prompt�upgrade_deps)�selfr	r
rrr
rrs        �4/opt/alt/python311/lib64/python3.11/venv/__init__.py�__init__zEnvBuilder.__init__.si��%9��!���
� ��
���� ��
�!����S�=�=��W�%�%�b�i�k�k�2�2�F����(�����c���	tj�|��}|�|��}|j}d|_|�|��|�|��|jr|�|��|j	s*|�
|��|�|��|rd|_|�|��|jr|�
|��dSdS)NFT)rr�abspath�ensure_directoriesr	�create_configuration�setup_pythonr
�
_setup_pipr�
setup_scripts�
post_setupr�upgrade_dependencies)r�env_dir�context�true_system_site_packagess    r�createzEnvBuilder.create<s��	��'�/�/�'�*�*���)�)�'�2�2��%)�$=�!�$)��!��!�!�'�*�*�*����'�"�"�"��=�	%��O�O�G�$�$�$��|�	%����w�'�'�'��O�O�G�$�$�$�$�	/�)-�D�%��%�%�g�.�.�.���	/��%�%�g�.�.�.�.�.�	/�	/rc��tj|��D]�}tj�||��}tj�|��stj�|��rtj|���utj�|��rtj	|����dS�N)
r�listdirr�join�islink�isfile�remove�isdir�shutil�rmtree)rr�fns   r�clear_directoryzEnvBuilder.clear_directoryXs����*�T�"�"�	"�	"�B�����d�B�'�'�B��w�~�~�b�!�!�
"�R�W�^�^�B�%7�%7�
"��	�"�
�
�
�
�����r�"�"�
"��
�b�!�!�!��	"�	"rc�>�||||d�}tj|d|���S)N)�base�platbase�installed_base�installed_platbase�venv)�scheme�vars)�	sysconfig�get_path)rr"�namer9s    r�
_venv_pathzEnvBuilder._venv_path`s4����%�")�	
�
���!�$�v�D�A�A�A�Arc��	d�}tjtj|��vr td|�dtj�d����tj�|��r|jr|�|��tj	��}||_
tj�|��d|_|j
�|j
n|j}d|z|_
||��tj}|std���tj�tj�|����\}}||_||_||_|�|d��}|�|d	��}	|�|d
��}
|	|_||	��||
��tjdkrttjdkrdtjd
krTtj�|d��}tj�|��stjd|��||_tj�||��|_tj�||��|_||��|j|_tjdkr�tj� |j��}tj�!|��tj�!|j��kr(tD�#d|j|��||_|S)Nc��tj�|��stj|��dStj�|��stj�|��rt
d|z���dS)NzUnable to create directory %r)rr�exists�makedirsr*r+�
ValueError)�ds r�create_if_neededz7EnvBuilder.ensure_directories.<locals>.create_if_neededqsw���7�>�>�!�$�$�
F���A�����������"�"�
F�b�g�n�n�Q�&7�&7�
F� �!@�1�!D�E�E�E�
F�
FrzRefusing to create a venv in z( because it contains the PATH separator r�z(%s) z�Unable to determine path to the running Python interpreter. Provide an explicit path or check that your PATH environment variable is correctly set.�scripts�include�purelibl�posix�darwin�lib64�lib�win32z�Actual environment location may have moved due to redirects, links or junctions.
  Requested location: "%s"
  Actual location:    "%s")$r�pathsep�fspathrBrr@r
r1�types�SimpleNamespacer"�split�env_namer�sys�_base_executabler�
executable�
python_dir�
python_exer=�inc_path�maxsizer<�platformr)�symlink�bin_path�relpath�bin_name�env_exe�env_exec_cmd�realpath�normcase�logger�warning)
rr"rDr#rrV�dirname�exename�binpath�incpath�libpath�	link_path�real_env_exes
             rrzEnvBuilder.ensure_directoriesis��	�	F�	F�	F��:���7�+�+�+�+��M�W�M�M�?A�z�M�M�M�N�N�
N�
�7�>�>�'�"�"�	*�t�z�	*�� � ��)�)�)��'�)�)��!����7�=�=��1�1�!�4��� $�� 7����W�=M�� �6�)������!�!�!��)�
��	/��.�/�/�
/��7�=�=������)D�)D�E�E����'���$���$����/�/�'�9�5�5���/�/�'�9�5�5���/�/�'�9�5�5��"������!�!�!����!�!�!�
�[�5�
 �
 �r�w�'�'9�'9�
�\�X�
%�
%�����W�g�6�6�I��7�>�>�)�,�,�
-��
�5�)�,�,�,�"����7�?�?�7�G�<�<����'�,�,�w��8�8������!�!�!� '�����<�7�"�"��7�+�+�G�O�<�<�L��w����-�-���1A�1A�'�/�1R�1R�R�R���� <� '���	>�>�>�
(4��$��rc��	tj�|jd��x|_}t|dd���5}|�d|jz��|jrd}nd}|�d|z��|�d	tj
dd
�z��|j�|�d|j�d���|�d
tj�tj
��z��g}tjdk}|r|jr|�d��|s|js|�d��|js|�d��|jr|�d��|jr|�d��|jr|�d��|jr|�d��|j�|�d|j�d���|�|j��d�|��}|�dtj
�d|�d���ddd��dS#1swxYwYdS)Nz
pyvenv.cfg�w�utf-8)�encodingz
home = %s
�true�falsez"include-system-site-packages = %s
zversion = %d.%d.%d
�z	prompt = �
zexecutable = %s
�nt�
--symlinks�--copies�
--without-pip�--system-site-packages�--clear�	--upgrade�--upgrade-depsz
--prompt="�"� z
command = z	 -m venv )rrr)r"�cfg_path�open�writerWr	rT�version_inforrbrVr<r�appendr
r
rrr)rr#r�f�incl�argsrus       rrzEnvBuilder.create_configuration�s���	�#%�'�,�,�w���"M�"M�M���4�
�$��g�
.�
.�
.� 	D�!�
�G�G�M�G�$6�6�7�7�7��(�
������
�G�G�9�D�@�A�A�A�
�G�G�*�S�-=�b�q�b�-A�A�B�B�B��{�&����5�D�K�5�5�5�6�6�6�
�G�G�'�"�'�*:�*:�3�>�*J�*J�J�K�K�K��D���D��B��
*�d�m�
*����L�)�)�)��
(�d�m�
(����J�'�'�'��=�
-����O�,�,�,��(�
6����4�5�5�5��z�
'����I�&�&�&��|�
)����K�(�(�(�� �
.����,�-�-�-���+����<��)9�<�<�<�=�=�=��K�K���(�(�(��8�8�D�>�>�D�
�G�G�B���B�B�$�B�B�B�C�C�C�A 	D� 	D� 	D� 	D� 	D� 	D� 	D� 	D� 	D� 	D� 	D� 	D���� 	D� 	D� 	D� 	D� 	D� 	Ds�H$I1�1I5�8I5ruc��	|j}|s�	tj�|��sJ|r3tjtj�|��|��ntj||��n.#t$r!t�d||��d}YnwxYw|rtj
||��dSdS)N�Unable to symlink %r to %rT)rrrr*r\r�	Exceptionrdrer.�copyfile)r�src�dst�relative_symlinks_ok�
force_copys     r�symlink_or_copyzEnvBuilder.symlink_or_copy�s���
�"�]�*�J��

&�	&��7�>�>�#�.�.�1�/�1��J�r�w�'7�'7��'<�'<�c�B�B�B�B��J�s�C�0�0�0��� �&�&�&��N�N�#?��c�J�J�J�!%�J�J�J�&�����
*����S�)�)�)�)�)�
*�
*s�A)A7�7(B"�!B"c���	tj�|��otj�|��}|jr�|s�tj�|��sy	|r3tjtj�|��|��ntj||��dS#t$rt�
d||��YnwxYwtj�tj�|����\}}tj�tj�
t��dd||z��}tj��stj�|��sv|�d��rd|z}|dd�}|dkrd}n|dkrd	}tj�tj�
|��||z��}n|}tj�|��s|st�
d
|��dSt'j||��dS)Nr�rFru�_d����python�venvlauncher�pythonw�
venvwlauncherzUnable to copy %r)rr�lexistsr@rr*r\rr�rdre�splitextr)rf�__file__r:�is_python_buildr+�endswithr.r�)rr�r�r��bad_srcr�ext�srcfns        rr�zEnvBuilder.symlink_or_copy�s2��
��g�o�o�c�*�*�F�2�7�>�>�#�3F�3F�/F�G��}�	
K�W�	
K�R�W�^�^�C�5H�5H�	
K�K�+�-��
�2�7�#3�#3�C�#8�#8�#�>�>�>�>��
�3��,�,�,��F�� �K�K�K��N�N�#?��c�J�J�J�J�J�K����
�G�,�,�R�W�-=�-=�c�-B�-B�C�C�M�H�c��G�L�L������!:�!:�!*�!%�!)�C��1�1�E��(�*�*�

�"�'�.�.��2G�2G�

��$�$�T�*�*�-���*�C�'����}�H��x�'�'�-�H�H���*�*�.�H��g�l�l�2�7�?�?�3�#7�#7��C��H�H������7�>�>�#�&�&�
��=��N�N�#6��<�<�<����O�C��%�%�%�%�%s�*A
B6�6&C�Cc�"�	|j}|j}|j}|j}tjdkr�||j|��tj�|��st	j	|d��dddtjd��fD]�}tj�||��}tj�
|��sG||j|d���tj�|��st	j	|d����dS|jr>d	�t	j|��D��}t!j��rd
�|D��}n=hd�}tj�|j��}|�|��|D]k}tj�||��}	tj�|	��r*||	tj�||�����lt!j��r�t	j|j��D]�\}
}}d|vr�tj�|
��}
tj�|jd
|
��}
tj�
|
��st	j|
��tj�|
d��}	tj�|
d��}t1j|	|��dS��dSdS)Nrui�r��python3zpython3.rET)r�c��g|]H}tj�tj�|��d��dv�F|��IS)rE)�.exez.dll)rrrcr���.0r�s  r�
<listcomp>z+EnvBuilder.setup_python.<locals>.<listcomp>5sS�������G�$�$�R�W�%5�%5�a�%8�%8��%;�<�<�@P�P�P��P�P�Prc�v�g|]6}tj�|���d���4|��7S))r��	vcruntime)rrrc�
startswithr�s  rr�z+EnvBuilder.setup_python.<locals>.<listcomp>:sM�� � � ����(�(��+�+�6�6�7N�O�O� �� � � r>�
python.exe�pythonw.exe�python_d.exe�
pythonw_d.exezinit.tcl�Lib)r]r`r�rWrr<rVrr*�chmodrTr�r)r@rr(r:r�r�addr��walkr"rAr.r�)rr#rhr�copierrf�suffix�suffixes�base_exer��root�dirs�files�tcldirr�s               rrzEnvBuilder.setup_pythons���	��"������%���$��
�7�d�?�?��F�7�%�t�,�,�,��7�>�>�$�'�'�
&����u�%�%�%�#�Y�0P�3�;K�A�;N�0P�0P�Q�
.�
.���w�|�|�G�V�4�4���w�~�~�d�+�+�.��F�7�?�D�t�L�L�L�L��7�>�>�$�/�/�.����u�-�-�-��
.�
.��}�
'�
��!�z�'�2�2������,�.�.�� � �#+� � � �H��
Z�Y�Y���7�+�+�G�O�<�<�����X�&�&�&�"�
?�
?���g�l�l�7�F�3�3���7�?�?�3�'�'�?��F�3�����W�f� =� =�>�>�>���(�*�*�
�)+���1C�)D�)D�	�	�%�D�$��!�U�*�*�!#��!1�!1�$�!7�!7��!#����g�o�u�f�!M�!M��!�w�~�~�f�5�5�0��K��/�/�/� �g�l�l�4��<�<�� �g�l�l�6�:�>�>�����S�1�1�1����+�
�
�	�	rc��	|jg|�}tj���x|d<}|j|d<|�dd��|�dd��|j|d<|j|d<t
j|fi|��dS)N�env�VIRTUAL_ENV�
PYTHONHOME�
PYTHONPATH�cwdrV)rar�environ�copyr"�pop�
subprocess�check_output)rr#�py_args�kwargsr�r�s      r�_call_new_pythonzEnvBuilder._call_new_pythonUs���F�
�$�/�w�/�� �j�o�o�/�/�/��u�
��$�_��M������d�#�#�#�����d�#�#�#����u�
�&�3��|�����/�/��/�/�/�/�/rc�R�	|�|ddddtj���dS)N�-m�	ensurepipr{z
--default-pip)�stderr)r�r��STDOUT�rr#s  rrzEnvBuilder._setup_pipdsA��?����g�t�[�+�-�j�6G�	�	I�	I�	I�	I�	Irc��	tj�tj�t����}tj�|d��}|�||��dS)NrF)rrrrfr�r)�install_scripts)rr#rs   rrzEnvBuilder.setup_scriptsis[��		��w���r�w���x�8�8�9�9���w�|�|�D�)�,�,�����W�d�+�+�+�+�+rc��	dSr'�r�s  rr zEnvBuilder.post_setupxs��	�	
�rc��	|�d|j��}|�d|j��}|�d|j��}|�d|j��}|�d|j��}|S)N�__VENV_DIR__�
__VENV_NAME__�__VENV_PROMPT__�__VENV_BIN_NAME__�__VENV_PYTHON__)�replacer"rSrr_r`)r�textr#s   r�replace_variableszEnvBuilder.replace_variables�s|��		��|�|�N�G�O�<�<���|�|�O�W�-=�>�>���|�|�-�w�~�>�>���|�|�/��1A�B�B���|�|�-�w��?�?���rc��	|j}t|��}tj|��D�]\\}}}||kr3|dd�D]'}|dtjfvr|�|���(�@|D�]}	tjdkr+|	�d��r|	�d��r�>tj�	||	��}
||d��
tj��dd�}|s|}ntjj	|g|�R�}tj�|��stj
|��tj�	||	��}
t|
d��5}	|	���}ddd��n#1swxYwY|
�d��sw	|�d��}|�||��}|�d��}n5#t&$r(}d}t(�d|
|��Yd}~nd}~wwxYw|�Rt|
d	��5}	|	�|��ddd��n#1swxYwYt/j|
|
������^dS)
N�commonrur�)r�z.pdb��rbroz+unable to copy script %r, may be binary: %s�wb)r]�lenrr�r<r,r�r�rr)rR�sepr@rAr��read�decoder��encode�UnicodeErrorrdrer�r.�copymode)rr#rrh�plenr�r�r�rCr��srcfiler��dstdir�dstfile�data�es                rr�zEnvBuilder.install_scripts�s)��	��"���4�y�y��!#�����!	6�!	6��D�$���t�|�|��a�a�a��'�'�A���2�7� 3�3�3����A�������
6�
6���G�t�O�O����X�(>�(>�O��J�J�'7�8�8�$���'�,�,�t�Q�/�/���d�e�e��*�*�2�6�2�2�1�2�2�6���<�$�F�F��W�\�'�;�F�;�;�;�F��w�~�~�f�-�-�(��K��'�'�'��'�,�,�v�q�1�1���'�4�(�(�$�A��6�6�8�8�D�$�$�$�$�$�$�$�$�$�$�$����$�$�$�$��'�'�(8�9�9�H�H�#�{�{�7�3�3��#�5�5�d�G�D�D��#�{�{�7�3�3����'�H�H�H�#�����(;�<C�Q�H�H�H�H�H�H�H�H�����H�����#��g�t�,�,�&������
�
�
�&�&�&�&�&�&�&�&�&�&�&����&�&�&�&��O�G�W�5�5�5��7
6�
!	6�!	6s=�:F�F�"F�<AG=�=
H/�H*�*H/�I&�&I*�-I*c��t�dt�d|j����|j|ddddgt�R�dS)Nz
Upgrading z
 packages in r�r�installr{)rd�debug�CORE_VENV_DEPSr]r�r�s  rr!zEnvBuilder.upgrade_dependencies�sh�����H��H�H�g�6F�H�H�	
�	
�	
�	���g�t�U�I�{�	/�-�	/�	/�	/�	/�	/�	/r)FFFFFNF)F)�__name__�
__module__�__qualname__rr%r1r=rrrr<r�rr�rrr r�r�r!r�rrrrsF�������2:?�GK�#�)�)�)�)�/�/�/�8"�"�"�B�B�B�B�B�B�H*D�*D�*D�X
�w�$���	*�	*�	*�	*�	*�&)	&�)	&�)	&�)	&�V;�;�;�z
0�
0�
0�I�I�I�

,�
,�
,�
�
�
����$06�06�06�d/�/�/�/�/rrFc�\�	t||||||���}|�|��dS)N)r	r
rr
rr)rr%)r"r	r
rr
rr�builders        rr%r%�sE��6��.B�$�x�(� &�\�C�C�C�G��N�N�7�����rc�L�d}tjdkrd}nttd��sd}|std���ddl}|�tdd�	��}|�d
ddd
���|�ddddd���tj	dkrd}nd}|�
��}|�d|ddd���|�d|ddd���|�ddddd���|�ddddd ���|�d!d"ddd#�$��|�d%d&�'��|�d(ddd)d*�d+�t�������|�|��}|jr|jrtd,���t#|j|j|j|j|j|j|j�-��}|jD]}|�|���dS).NT)rsrsF�base_prefixz.This script is only for use with Python >= 3.3rzFCreates virtual Python environments in one or more target directories.z|Once an environment has been created, you may wish to activate it, e.g. by sourcing an activate script in its bin directory.)�prog�description�epilogr��ENV_DIR�+z)A directory to create the environment in.)�metavar�nargs�helpry�
store_true�system_sitezDGive the virtual environment access to the system site-packages dir.)�default�action�destr�rurvrz[Try to use symlinks rather than copies, when symlinks are not the default for the platform.rw�store_falsez\Try to use copies rather than symlinks, even when symlinks are the default for the platform.rzr
zcDelete the contents of the environment directory if it already exists, before environment creation.r{rzlUpgrade the environment directory to use this version of Python, assuming Python has been upgraded in-place.rxr
z]Skips installing or upgrading pip in the virtual environment (pip is bootstrapped by default))rrrr�z--promptz;Provides an alternative prompt prefix for this environment.)r�r|rz;Upgrade core dependencies: {} to the latest version in PyPIr~z1you cannot supply --upgrade and --clear together.)r	r
rrr
rr)rTr��hasattrrB�argparse�ArgumentParserr��add_argumentrr<�add_mutually_exclusive_group�formatr)r��
parse_argsrr
rrrr
rrr�r%)	r��
compatibler�parser�use_symlinks�group�optionsr�rCs	         r�mainr�s���J�
��&� � ��
�
�
�S�-�
(�
(���
��F��I�J�J�J������(�(�h�6D�1H�)�	I�	I��	���F�I�S�!L�	�	N�	N�	N����4�e�#/�m�"=�	�	>�	>�	>��7�d�?�?� �L�L��L��3�3�5�5��
���<��".�Z�!0�	�	1�	1�	1�
	���:�<�/?�"/�j�!0�	�	1�	1�	1�
	���I�u�\�!(�0G�	�	H�	H�	H�
	���K��|�!*�2M�	�	N�	N�	N�
	���O�*�$(��"/�	�	0�	0�	0�
	���J�"5�	�	6�	6�	6�	���,�e�L�!/�"3�39�6�!$���.�!9�!9�4;�4;�	�	<�	<�	<�
�#�#�D�)�)���?�	R�w�}�	R��P�Q�Q�Q��'�2E�#*�=�&-�&6�%,�_�&-�&6�$+�N�*1�*>�
@�@�@����	�	�A��N�N�1�����	�	r�__main__rEz	Error: %s)�file)FFFFNFr')�loggingrr.r�rTr:rPr��	getLoggerr�rdrr%r�rcr�r��printr��exitr�rr�<module>rs]�������	�	�	�	�
�
�
�
�����
�
�
�
���������'��	��	�8�	$�	$��w/�w/�w/�w/�w/�w/�w/�w/�t
7<�EJ�����L�L�L�L�\�z���	
�B�0������
�����0�0�0�
��k�A�o�C�J�/�/�/�/�/�/�/�/�/�����0�����C�H�R�L�L�L�L�L��s�A�B�"A<�<B

?>