관리-도구
편집 파일: __init__.cpython-310.opt-2.pyc
o 6��f�] � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZdZe �e �Z G dd� d�Z ddd�Zddd �Z e d krgdZze � d ZW n ey_ Z zede ejd � W Y dZ[ndZ[ww e�e� dS dS )� N)�pipZ setuptoolsc @ s� e Zd Z d!dd�Zdd� Zdd� Zd d � Zdd� Zej d kr(d"dd�Z nd"dd�Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd � ZdS )#� EnvBuilderFNc C sF || _ || _|| _|| _|| _|dkrtj�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 �4/opt/alt/python310/lib64/python3.10/venv/__init__.py�__init__. s zEnvBuilder.__init__c C s� t j�|�}| �|�}| j}d| _| �|� | �|� | jr$| �|� | j s1| � |� | �|� |r;d| _| �|� | jrE| � |� d S 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 ]&}t j�||�}t j�|�st j�|�r t �|� qt j�|�r+t� |� qd 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 ur+| j n|j }d| |_ ||� tj}|s@t d��t j�t j�|��\}}||_||_||_tjdkrgd}d} t j�|d d �} nd}d} t j�|d dtjd d� d �} t j�|| � |_}||� || � tjdkr�t jdkr�tjdkr�t j�|d�}t j�|�s�t �d |� t j�||� |_} ||_t j�| |�|_|| � |j|_tjdkr�t j�|j�}t j�|�t j�|j�kr�t� d|j|� ||_|S )Nc S sB t j�| �s t �| � d S t j�| �st j�| �rtd| ��d S )NzUnable to create directory %r)r r �exists�makedirsr"