
    yIf                       d dl mZ d dlZd dlmZ ej        dk    r	d dlmZ dZnAd dl	mZm
Z
  ed  e
d	                              d
          dd         D                       Z G d d          Z G d de          ZddgZdS )    )annotationsN)OrderedDict)      )entry_points )r   versionc              #  4   K   | ]}t          |          V  d S N)int).0is     N/var/www/piapp/venv/lib/python3.11/site-packages/virtualenv/run/plugin/base.py	<genexpr>r      s(      &d&d!s1vv&d&d&d&d&d&d    importlib_metadata.   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   
   )r      c              3  L   K   | ]}|j         |                                fV   d S r   nameloadr   es     r   r   z0PluginLoader.entry_points_for.<locals>.<genexpr>   s1      ``a1``````r   )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)selfr9   r=   r   r;   s        r   __init__zComponentBuilder.__init__"   s^    &	 //d/;;##D$t}*=*=>>>>>r   c                R    | j         |                     |          | _         | j         S r   )r0   r*   r'   s     r   optionszComponentBuilder.options*   s'    <//44CL|r   c                    t           r   )NotImplementedError)r@   r   choicess      r   r>   z'ComponentBuilder.add_selector_arg_parse0   s    !!r   c                    t          || j                  }|| j        vrd| j         }t	          |          | j        |         | _        |                     ||j                   |S )NzNo implementation for )getattrr   r;   r9   RuntimeErrorr:   populate_selected_argparseapp_data)r@   rC   selectedmsgs       r   handle_selected_arg_parsez*ComponentBuilder.handle_selected_arg_parse3   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   r=   descriptionr:   add_parser_argumentsr9   )r@   rL   rK   s      r   rJ   z+ComponentBuilder.populate_selected_argparse<   sD    "G"G"GX"G"G--dk4;KXVVVVVr   c                8    |                      || j                  S r   )r:   r9   )r@   rC   s     r   createzComponentBuilder.create@   s    )9:::r   N)r5   r6   )
r-   r.   r/   rA   r1   rC   r>   rN   rJ   rT   r   r   r   r4   r4   !   s        ? ? ? ?   [
" " "  W W W; ; ; ; ;r   r4   )
__future__r   r"   collectionsr   r#   importlib.metadatar   r$   r   r	   tuplesplitr   r4   __all__r   r   r   <module>r[      s   " " " " " " 



 # # # # # #v//////!#88888888!&&d&dww?S7T7T7Z7Z[^7_7_`bab`b7c&d&d&d!d!d* * * * * * * *" ;  ;  ;  ;  ;|  ;  ;  ;H r   