관리-도구
편집 파일: activators.cpython-38.pyc
U *�e� � @ sJ d dl mZ d dlmZ d dlmZ ddlmZ G dd� de�ZdgZ dS ) � )�annotations)�ArgumentTypeError)�OrderedDict� )�ComponentBuilderc sB e Zd Zdd�� fdd�Zdd� Zdd� Zd d � Zdd� Z� ZS ) �ActivationSelector�None)�returnc sJ d | _ t� fdd�| �d��� D ��}t� �� |d|� d| j_d | _d S )Nc 3 s$ | ]\}}|� � �r||fV qd S )N)Zsupports��.0�k�v��interpreter� �N/opt/hc_python/lib/python3.8/site-packages/virtualenv/run/plugin/activators.py� <genexpr> s z.ActivationSelector.__init__.<locals>.<genexpr>zvirtualenv.activate� activatorszoptions for activation scripts) �defaultr �options�items�super�__init__�parser�description�active)�selfr r �possible�� __class__r r r s �zActivationSelector.__init__c C s2 d� |�| _| jjd|� �| jddd| jd� d S )N�,z--Zcomma_sep_listFz1activators to generate - default is all supported)r �metavar�required�help�type)�joinr r �add_argument�_extract_activators)r �name�choicesr r r �add_selector_arg_parse s �z)ActivationSelector.add_selector_arg_parsec sF dd� |� d�D �}� fdd�|D �}|rBdd�|�� �}t|��|S )Nc S s g | ]}|� � r|� � �qS r )�strip�r �er r r � <listcomp> s z:ActivationSelector._extract_activators.<locals>.<listcomp>r c s g | ]}|� j kr|�qS r )r r, �r r r r. s z+the following activators are not available )�splitr% r )r Zentered_str�elements�missing�msgr r/ r r'