관리-도구
편집 파일: __init__.cpython-37.opt-2.pyc
B YI~dR � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZe �e�Z G dd� d�Z d dd�Zddd�Zed kr�d Z ye� d Z W n4 ek r� Z zede ejd� W ddZ[X Y nX e�e � dS )� Nc @ s� e Zd Zddd�Zdd� Zdd� Zd d � Zdd� Zej d krHddd�Z n ddd�Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� ZdS ) � EnvBuilderFNc C s( || _ || _|| _|| _|| _|| _d S )N)�system_site_packages�clear�symlinks�upgrade�with_pip�prompt)�selfr r r r r r � r �2/opt/alt/python37/lib64/python3.7/venv/__init__.py�__init__+ s zEnvBuilder.__init__c C sx t j�|�}| �|�}| j}d| _| �|� | �|� | jrF| �|� | j s`| � |� | �|� |rtd| _| �|� d S )NFT)�os�path�abspath�ensure_directoriesr �create_configuration�setup_pythonr � _setup_pipr � setup_scripts� post_setup)r �env_dir�contextZtrue_system_site_packagesr r r �create4 s zEnvBuilder.createc C s` xZt �|�D ]L}t j�||�}t j�|�s6t j�|�rBt �|� qt j�|�rt� |� qW d S )N) r �listdirr �join�islink�isfile�remove�isdir�shutilZrmtree)r r �fnr r r �clear_directoryN s zEnvBuilder.clear_directoryc C s� dd� }t j�|�r$| jr$| �|� t�� }||_t j�|�d |_ | j d k rT| j n|j }d| |_ ||� t j}tt dt j�}t j�t j�|��\}}||_||_||_t jdkr�d} d} t j�|d d �}n(d} d} t j�|d dt jd d� d �}t j�|| � |_}||� ||� t jdk�rft jdk�rft jdk�rft j�|d�} t j�| ��sft �d | � t j�|| � |_}| |_t 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 r � ValueError)�dr r r �create_if_needed^ s z7EnvBuilder.ensure_directories.<locals>.create_if_needed� z(%s) �_base_executable�win32ZScriptsZInclude�Libz site-packages�binZinclude�libzpython%d.%d� l �posix�darwin�lib64)r r r"