관리-도구
편집 파일: session.cpython-37.pyc
B ���a � @ sT d dl mZmZ d dlZd dlZd dlmZ G dd� de�ZdZ G dd� de�Z dS ) � )�absolute_import�unicode_literalsN)�ensure_textc @ s� e Zd ZdZdd� Zedd� �Zedd� �Zedd � �Zed d� �Z edd � �Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� ZdS )�Sessionz1Represents a virtual environment creation sessionc C s( || _ || _|| _|| _|| _|| _d S )N)� _verbosity� _app_data�_interpreter�_creator�_seeder�_activators)�self� verbosityZapp_data�interpreter�creator�seeder� activators� r �G/opt/alt/python37/lib/python3.7/site-packages/virtualenv/run/session.py�__init__ s zSession.__init__c C s | j S )zThe verbosity of the run)r )r r r r r s zSession.verbosityc C s | j S )z@Create a virtual environment based on this reference interpreter)r )r r r r r s zSession.interpreterc C s | j S )z[The creator used to build the virtual environment (must be compatible with the interpreter))r )r r r r r s zSession.creatorc C s | j S )zHThe mechanism used to provide the seed packages (pip, setuptools, wheel))r )r r r r r # s zSession.seederc C s | j S )z/Activators used to generate activations scripts)r )r r r r r ( s zSession.activatorsc C s( | � � | �� | �� | jj�� d S )N)�_create�_seed� _activater Z pyenv_cfg�write)r r r r �run- s zSession.runc C s@ t �dtt| j��� | j�� t �t� t �dt| j�� d S )Nz!create virtual environment via %sz%s) �logging�infor �strr r �debug� _DEBUG_MARKER�_Debug)r r r r r 3 s zSession._createc C s2 | j d k r.| j jr.t�d| j � | j �| j� d S )Nzadd seed packages via %s)r �enabledr r r r )r r r r r 9 s z Session._seedc C sD | j r@t�dd�dd� | j D ��� x| j D ]}|�| j� q,W d S )Nzadd activators for %sz, c s s | ]}t |�j�d d�V qdS )Z Activator� N)�type�__name__�replace)�.0�ir r r � <genexpr>B s z$Session._activate.<locals>.<genexpr>)r r r �joinZgenerater )r Z activatorr r r r >