Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib/python3.7/site-packages/virtualenv/run/plugin/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/virtualenv/run/plugin/__pycache__/creators.cpython-37.pyc

B

���a�
�@snddlmZmZddlmZmZmZddlmZddl	m
Z
ddlmZeddd	d
dg�Z
Gdd
�d
e�ZdS)�)�absolute_import�unicode_literals)�OrderedDict�defaultdict�
namedtuple)�Describe)�VirtualenvBuiltin�)�ComponentBuilder�CreatorInfo�key_to_class�key_to_meta�describe�builtin_keycsPeZdZ�fdd�Zedd��Zdd�Zedd��Zd	d
�Z	�fdd�Z
�ZS)
�CreatorSelectorcs2|�|�\}|_|_|_tt|��||d|�dS)NZcreator)�for_interpreterr
rr�superr�__init__)�self�interpreter�parserZcreators)�	__class__��O/opt/alt/python37/lib/python3.7/site-packages/virtualenv/run/plugin/creators.pyrszCreatorSelector.__init__cCst�iddf\}}}}tt�}x�|�d���D]�\}}|dkrFtd��|�|�}	|	r�|	jrl||	j�|�n6d|kr�t	|t
�r�|}||d<|	|d<|||<|	||<|dkr.t	|t�r.|�|�r.|}q.W|s�|r�dd�|��D�}
td�
|
���ntd�|���t||||d�S)	Nzvirtualenv.create�builtinz"builtin creator is a reserved namec	Ss,g|]$\}}d�|d�dd�|D����qS)z{} for creators {}z, css|]}|jVqdS)N)�__name__)�.0�irrr�	<genexpr>(sz=CreatorSelector.for_interpreter.<locals>.<listcomp>.<genexpr>)�format�join)r�k�vrrr�
<listcomp>(sz3CreatorSelector.for_interpreter.<locals>.<listcomp>�
z#No virtualenv implementation for {})rr
rr)rr�list�options�items�RuntimeErrorZ
can_create�error�append�
issubclassrrZcan_describer rr)�clsrrr
rr�errors�keyZ
creator_class�metaZrowsrrrrs6
zCreatorSelector.for_interpreterc
CsVt|dd�d�}|�|�}|jjd�|�||dd�|jdkr@dn
d�|j��d	�dS)
NcSs|dkrdSdS)Nrrr	r)�arrr�<lambda>5�z8CreatorSelector.add_selector_arg_parse.<locals>.<lambda>)r.z--{}Fzcreate environment via{}�z (builtin = {}))�choices�default�required�help)�sorted�_get_defaultr�add_argumentrr)r�namer4�
default_valuerrr�add_selector_arg_parse3s
z&CreatorSelector.add_selector_arg_parsecCstt|��S)N)�next�iter)r4rrrr9AszCreatorSelector._get_defaultcCs2d�|j|�|j_|j�|j|j|j||�dS)Nzoptions for {} {})rr;r�description�_impl_classZadd_parser_argumentsrr
)r�selectedZapp_datarrr�populate_selected_argparseEsz*CreatorSelector.populate_selected_argparsecs@|jt||j�|_t|jt�s0|�||j�|_t	t
|��|�S)N)r
�getattrr;r/r+rArrrrr�create)rr&)rrrrEIszCreatorSelector.create)r�
__module__�__qualname__r�classmethodrr=�staticmethodr9rCrE�
__classcell__rr)rrr
s!rN)�
__future__rr�collectionsrrrZvirtualenv.create.describerZ4virtualenv.create.via_global_ref.builtin.builtin_wayr�baser
rrrrrr�<module>s

Hacked By AnonymousFox1.0, Coded By AnonymousFox