HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/venv/__pycache__/__init__.cpython-310.opt-2.pyc
o

�i�]�
@s�	ddlZddlZddlZddlZddlZddlZddlZdZe�e	�Z
Gdd�d�Z		ddd�Zddd	�Z
e	d
krgdZze
�dZWney_Zzedeejd
�WYdZ[ndZ[wwe�e�dSdS)�N)�pipZ
setuptoolsc@s�eZdZ				d!dd�Zdd�Zdd�Zd	d
�Zdd�Zej	d
kr(d"dd�Z
nd"dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �ZdS)#�
EnvBuilderFNcCsF||_||_||_||_||_|dkrtj�t���}||_	||_
dS)N�.)�system_site_packages�clear�symlinks�upgrade�with_pip�os�path�basename�getcwd�prompt�upgrade_deps)�selfrrrrr	rr�r�*/usr/local/lib/python3.10/venv/__init__.py�__init__.s
zEnvBuilder.__init__cCs�	tj�|�}|�|�}|j}d|_|�|�|�|�|jr$|�|�|j	s1|�
|�|�|�|r;d|_|�|�|jrE|�
|�dSdS)NFT)r
r�abspath�ensure_directoriesr�create_configuration�setup_pythonr	�
_setup_pipr�
setup_scripts�
post_setupr�upgrade_dependencies)r�env_dir�contextZtrue_system_site_packagesrrr�create;s$






�zEnvBuilder.createcCs\t�|�D]&}tj�||�}tj�|�stj�|�r t�|�qtj�|�r+t�	|�qdS�N)
r
�listdirr�join�islink�isfile�remove�isdir�shutil�rmtree)rr�fnrrr�clear_directoryWs
��zEnvBuilder.clear_directorycCs�	dd�}tj�|�r|jr|�|�t��}||_tj�|�d|_	|j
dur+|j
n|j	}d||_
||�tj}|s@t
d��tj�tj�|��\}}||_||_||_tjdkrgd}d}	tj�|d	d
�}
nd}d}	tj�|d
dtjdd�d
�}
tj�||	�|_}||�||
�tjdkr�tjdkr�tjdkr�tj�|d�}tj�|�s�t�d
|�tj�||�|_}
||_tj�|
|�|_||
�|j|_tjdkr�tj�|j�}tj�|�tj�|j�kr�t� d|j|�||_|S)NcSsBtj�|�s
t�|�dStj�|�stj�|�rtd|��dS)NzUnable to create directory %r)r
r�exists�makedirsr"r#�
ValueError)�drrr�create_if_neededgs
�z7EnvBuilder.ensure_directories.<locals>.create_if_needed�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.�win32ZScriptsZInclude�Libz
site-packages�binZinclude�libzpython%d.%d�l�posix�darwinZlib64z�Actual environment location may have moved due to redirects, links or junctions.
  Requested location: "%s"
  Actual location:    "%s")!r
rr*rr)�types�SimpleNamespacer�split�env_namer�sys�_base_executabler,r�
executable�
python_dirZ
python_exe�platformr!�version_infoZinc_path�maxsize�name�symlink�bin_path�bin_name�env_exe�env_exec_cmd�realpath�normcase�logger�warning)rrr.rrr=�dirnameZexenameZbinnameZincpathZlibpathrZ	link_path�binpathZreal_env_exerrrr_s`



�

�zEnvBuilder.ensure_directoriescCs�	tj�|jd�|_}t|ddd��C}|�d|j�|jr"d}nd}|�d|�|�d	t	j
dd
��|jdurN|�d|j�d��Wd�dSWd�dS1sYwYdS)
Nz
pyvenv.cfg�w�utf-8)�encodingz
home = %s
�trueZfalsez"include-system-site-packages = %s
zversion = %d.%d.%d
�z	prompt = �
)r
rr!rZcfg_path�open�writer>rr;r@r)rrr�fZinclrrrr�s
�"�zEnvBuilder.create_configuration�ntcCs�	|j}|s5ztj�|�s!|rt�tj�|�|�nt�||�Wnty4t�d||�d}Ynw|r?t	�
||�dSdS)N�Unable to symlink %r to %rT)rr
rr"rCr�	ExceptionrJrKr&�copyfile)r�src�dst�relative_symlinks_okZ
force_copyrrr�symlink_or_copy�s ���zEnvBuilder.symlink_or_copycCsX	tj�|�o
tj�|�}|jrB|sBtj�|�sBz|r)t�tj�|�|�WdSt�||�WdStyAt	�
d||�Ynwtj�tj�|��\}}tj�tj�
t�dd||�}t�d�shtj�|�s�|�d�rwd|}|dd�}|dkr~d}n|d	kr�d
}tj�tj�
|�||�}n|}tj�|�s�|s�t	�
d|�dSt�||�dS)NrX�scriptsrWTZ_d����pythonZvenvlauncherZpythonwZ
venvwlauncherzUnable to copy %r)r
r�lexistsr*rr"rCrrYrJrK�splitextr!rL�__file__�	sysconfig�is_python_buildr#�endswithr&rZ)rr[r\r]Zbad_srcr�extZsrcfnrrrr^�sB���
cCs�	|j}|j}|j}|j}tjdkrU||j|�tj�|�s$t�	|d�dddt
jd��fD]#}tj�||�}tj�
|�sR||j|dd�tj�|�sRt�	|d�q/dS|jrod	d
�t�|�D�}t�d�rndd
�|D�}nhd�}tj�|j�}|�|�|D]}tj�||�}	tj�|	�r�||	tj�||��q�t�d�r�t�|j�D]<\}
}}d
|vr�tj�|
�}
tj�|jd|
�}
tj�
|
�s�t�|
�tj�|
d
�}	tj�|
d
�}t�|	|�dSq�dSdS)NrWi�raZpython3zpython3.r/T)r]cSs,g|]}tj�tj�|�d�dvr|�qS)r/)�.exez.dll)r
rrIrc��.0rVrrr�
<listcomp>s
�z+EnvBuilder.setup_python.<locals>.<listcomp>cSs"g|]
}tj�|��d�r|�qS))raZ	vcruntime)r
rrI�
startswithrjrrrrls��>z
python.exez
pythonw_d.exezpythonw.exezpython_d.exezinit.tclr1)rDrFr^r>r
rBr=rr"�chmodr;r@r!r*rr rerfr�addrb�walkrr+r&rZ)rrrMrZcopierrL�suffix�suffixesZbase_exer[�root�dirs�filesZtcldirr\rrrr�s`
��	�
��
�

��zEnvBuilder.setup_pythoncOsl	|jg|�}tj��|d<}|j|d<|�dd�|�dd�|j|d<|j|d<tj|fi|��dS)N�envZVIRTUAL_ENVZ
PYTHONHOMEZ
PYTHONPATH�cwdr=)rGr
�environ�copyr�pop�
subprocess�check_output)rrZpy_args�kwargs�argsrvrrr�_call_new_python7s


zEnvBuilder._call_new_pythoncCs	|j|ddddtjd�dS)N�-mZ	ensurepip�	--upgradez
--default-pip)�stderr)rr{�STDOUT�rrrrrrFs
�zEnvBuilder._setup_pipcCs4	tj�tj�t��}tj�|d�}|�||�dS)Nr_)r
rrrLrdr!�install_scripts)rrrrrrrKs
zEnvBuilder.setup_scriptscCs	dSrrr�rrrrZszEnvBuilder.post_setupcCsL	|�d|j�}|�d|j�}|�d|j�}|�d|j�}|�d|j�}|S)NZ__VENV_DIR__Z
__VENV_NAME__Z__VENV_PROMPT__Z__VENV_BIN_NAME__Z__VENV_PYTHON__)�replacerr:rrErF)r�textrrrr�replace_variablesds
zEnvBuilder.replace_variablescCs�	|j}t|�}t�|�D]�\}}}||kr,|dd�D]}|dtjfvr*|�|�qq
|D]�}	tjdkr@|	�d�r@|	�d�r@q.tj�	||	�}
||d��
tj�dd�}|sZ|}n
tjj	|g|�R�}tj�|�sot�
|�tj�	||	�}
t|
d��}	|	��}Wd�n1s�wY|
�d�s�z|�d�}|�||�}|�d�}Wnty�}zd}t�d|
|�WYd}~nd}~ww|dur�t|
d	��
}	|	�|�Wd�n1s�wYt�|
|
�q.q
dS)
N�commonrWra)riz.pdbr4�rbrOz+unable to copy script %r, may be binary: %s�wb)rD�lenr
rprBr$rmrgrr!r9�sepr*r+rT�read�decoder��encode�UnicodeErrorrJrKrUr&�copymode)rrrrMZplenrsrtrur-rVZsrcfilerqZdstdirZdstfile�data�errrr�vs\
��

�

�������zEnvBuilder.install_scriptscCs6t�dt�d|j���|j|ddddgt�R�dS)Nz
Upgrading z
 packages in r�r�installr�)rJ�debug�CORE_VENV_DEPSrDrr�rrrr�s��zEnvBuilder.upgrade_dependencies)FFFFFNF)F)�__name__�
__module__�__qualname__rrr)rrr
rBr^rrrrrr�r�rrrrrrs*
�
G

+=
2rFcCs$	t||||||d�}|�|�dS)N)rrrr	rr)rr)rrrrr	rr�builderrrrr�s�rc	
Csxd}tjdkr
d}nttd�sd}|std��ddl}|jtddd	�}|jd
ddd
d�|jdddddd�tj	dkr>d}nd}|�
�}|jd|dddd�|jd|dddd�|jdddddd�|jddddd d�|jd!d"ddd#d$�|jd%d&d'�|jd(ddd)d*�d+�t
��d�|�|�}|jr�|jr�td,��t|j|j|j|j|j|j|jd-�}|jD]}|�|�q�dS).NT)rRrRF�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�epilogrtZENV_DIR�+z)A directory to create the environment in.)�metavar�nargs�helpz--system-site-packages�
store_true�system_sitezDGive the virtual environment access to the system site-packages dir.)�default�action�destr�rWz
--symlinksrz[Try to use symlinks rather than copies, when symlinks are not the default for the platform.z--copies�store_falsez\Try to use copies rather than symlinks, even when symlinks are the default for the platform.z--clearrzcDelete the contents of the environment directory if it already exists, before environment creation.r�rzlUpgrade the environment directory to use this version of Python, assuming Python has been upgraded in-place.z
--without-pipr	z]Skips installing or upgrading pip in the virtual environment (pip is bootstrapped by default))r�r�r�r�z--promptz;Provides an alternative prompt prefix for this environment.)r�z--upgrade-depsrz;Upgrade core dependencies: {} to the latest version in PyPI� z1you cannot supply --upgrade and --clear together.)rrrrr	rr)r;r@�hasattrr,�argparse�ArgumentParserr��add_argumentr
rB�add_mutually_exclusive_group�formatr!r��
parse_argsrrrr�rr	rrrtr)	r~Z
compatibler��parserZuse_symlinks�group�optionsr�r-rrr�main�s�

�

��
�
�
�
���
��
�
�r��__main__r/z	Error: %s)�file)FFFFNFr)�loggingr
r&r{r;rer7r��	getLoggerr�rJrrr��rcrYr��printr��exitrrrr�<module>s:

�
N���