
    .Ph0                    t    d dl mZ d dlZd dlmZ d dlmZ dZ G d d          Z G d d	e          Z	d	dgZ
dS )
    )annotationsN)OrderedDict)entry_points c                  B    e Zd ZdZdZed             Zed             ZdS )PluginLoaderNc                4   t           j        dk    st          dk    r?t          d |                                                     |          D                       S t          d |                                                     |i           D                       S )N)   
   )r
      c              3  L   K   | ]}|j         |                                fV   d S Nnameload.0es     Z/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/virtualenv/run/plugin/base.py	<genexpr>z0PluginLoader.entry_points_for.<locals>.<genexpr>   s1      ``a1``````    )groupc              3  L   K   | ]}|j         |                                fV   d S r   r   r   s     r   r   z0PluginLoader.entry_points_for.<locals>.<genexpr>   s1      WW!AFAFFHH-WWWWWWr   )sysversion_infoimportlib_metadata_versionr   r   selectgetclskeys     r   entry_points_forzPluginLoader.entry_points_for   s    w&&*D*N*N``3;K;K;M;M;T;T[^;T;_;_``````WWs7G7G7I7I7M7McSU7V7VWWWWWWr   c                 b    t           j        t                      t           _        t           j        S r   )r   _ENTRY_POINTSr   r   r   r   r   zPluginLoader.entry_points   s     %-)5L&))r   )	__name__
__module____qualname___OPTIONSr$   classmethodr"   staticmethodr   r   r   r   r   r   
   sU        HMX X [X
 * * \* * *r   r   c                  D    e Zd Zd
dZed             Zd Zd Zd Zd Z	d	S )ComponentBuilderreturnNonec                    || _         || _        d | _        || _        |                    |          | _        |                     |t          | j                             d S )N)title)interpreterr   _impl_classpossibleadd_argument_groupparseradd_selector_arg_parselist)selfr1   r5   r   r3   s        r   __init__zComponentBuilder.__init__   s^    &	 //d/;;##D$t}*=*=>>>>>r   c                R    | j         |                     |          | _         | j         S r   )r(   r"   r   s     r   optionszComponentBuilder.options$   s'    <//44CL|r   c                    t           r   )NotImplementedError)r8   r   choicess      r   r6   z'ComponentBuilder.add_selector_arg_parse*   s    !!r   c                    t          || j                  }|| j        vrd| j         }t	          |          | j        |         | _        |                     ||j                   |S )NzNo implementation for )getattrr   r3   r1   RuntimeErrorr2   populate_selected_argparseapp_data)r8   r;   selectedmsgs       r   handle_selected_arg_parsez*ComponentBuilder.handle_selected_arg_parse-   sk    7DI..4=((=4+;==Cs###=2'''2BCCCr   c                    d| j          d| | j        _        | j                            | j        | j        |           d S )Nzoptions for  )r   r5   descriptionr2   add_parser_argumentsr1   )r8   rD   rC   s      r   rB   z+ComponentBuilder.populate_selected_argparse6   sD    "G"G"GX"G"G--dk4;KXVVVVVr   c                8    |                      || j                  S r   )r2   r1   )r8   r;   s     r   createzComponentBuilder.create:   s    )9:::r   N)r-   r.   )
r%   r&   r'   r9   r)   r;   r6   rF   rB   rL   r   r   r   r,   r,      s        ? ? ? ?   [
" " "  W W W; ; ; ; ;r   r,   )
__future__r   r   collectionsr   importlib.metadatar   r   r   r,   __all__r   r   r   <module>rQ      s    " " " " " " 



 # # # # # # + + + + + + * * * * * * * *" ;  ;  ;  ;  ;|  ;  ;  ;H r   