Your IP : 18.218.63.176
a
R�f�Z �
@ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZdZe �e �Z
G dd� d�Zddd�Zddd �Z
e d
kr�dZze
� d ZW n6 ey� Z zede ejd
� W Y dZ[n
dZ[0 0 e�e� dS )� N)�pipZ
setuptoolsc @ s� e Zd Zddd�Zdd� Zdd� Zd d
� Zdd� Zej d
krHd dd�Z
n
d!dd�Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� ZdS )"�
EnvBuilderFNc C sF || _ || _|| _|| _|| _|dkr6tj�t�� �}|| _ || _
d S )N�.)�system_site_packages�clear�symlinks�upgrade�with_pip�os�path�basename�getcwd�prompt�upgrade_deps)�selfr r r r r r r � r �2/opt/alt/python39/lib64/python3.9/venv/__init__.py�__init__. s zEnvBuilder.__init__c C s� t j�|�}| �|�}| j}d| _| �|� | �|� | jrF| �|� | j s`| �
|� | �|� |rtd| _| �|� | jr�| �
|� d S )NFT)r
r �abspath�ensure_directoriesr �create_configuration�setup_pythonr �
_setup_pipr �
setup_scripts�
post_setupr �upgrade_dependencies)r �env_dir�contextZtrue_system_site_packagesr r r �create; s
zEnvBuilder.createc C s\ t �|�D ]L}t j�||�}t j�|�s4t j�|�r@t �|� q
t j�|�r
t� |� q
d S �N)
r
�listdirr �join�islink�isfile�remove�isdir�shutilZrmtree)r r �fnr r r �clear_directoryW s zEnvBuilder.clear_directoryc C s� dd� }t j�|�r$| jr$| �|� t�� }||_t j�|�d |_ | j
d urT| j
n|j }d| |_
||� tj}t j�t j�
|��\}}||_||_||_tjdkr�d}d} t j�|dd �}
n(d
}d} t j�|dd
tjd d� d �}
t j�|| � |_}||� ||
� tjdk�rXt jdk�rXtjdk�rXt j�|d�}t j�|��sXt �d|� t j�||� |_}
||_t j�|
|�|_||
� |j|_tjdk�r�t j�|j�}t j�|�t j�|j�k�r�t�d|j|� ||_|S )Nc S s@ t j�| �st �| � n$t j�| �s0t j�| �r<td| ��d S )NzUnable to create directory %r)r
r �exists�makedirsr"