U e@sJddlmZddlmZddlmZddlmZGdddeZdgZ dS) ) annotations)ArgumentTypeError) OrderedDict)ComponentBuildercsBeZdZddfdd ZddZddZd d Zd d ZZS) ActivationSelectorNone)returncsJd|_tfdd|dD}t|d|d|j_d|_dS)Nc3s$|]\}}|r||fVqdS)N)Zsupports.0kv interpreterN/opt/hc_python/lib/python3.8/site-packages/virtualenv/run/plugin/activators.py s z.ActivationSelector.__init__..zvirtualenv.activate activatorszoptions for activation scripts) defaultroptionsitemssuper__init__parser descriptionactive)selfrrpossible __class__rrr s  zActivationSelector.__init__cCs2d||_|jjd||jddd|jddS)N,z--Zcomma_sep_listFz1activators to generate - default is all supported)rmetavarrequiredhelptype)joinrr add_argument_extract_activators)rnamechoicesrrradd_selector_arg_parses z)ActivationSelector.add_selector_arg_parsecsFdd|dD}fdd|D}|rBdd|}t||S)NcSsg|]}|r|qSr)stripr errr sz:ActivationSelector._extract_activators..r csg|]}|jkr|qSr)rr,rrrr. s z+the following activators are not available )splitr%r)rZ entered_strelementsmissingmsgrr/rr's z&ActivationSelector._extract_activatorscsr|j|jkr||jn|jfdd|jD|_|jjdddddd|jD]}| |j|j qXdS)Ncsi|]\}}|kr||qSrrr Zselected_activatorsrr *sz@ActivationSelector.handle_selected_arg_parse..z--promptpromptzsprovides an alternative prompt prefix for this environment (value of . means name of the current working directory))destr!r#r) rrr'rrrrr&valuesZadd_parser_argumentsr)rrZ activatorrr4rhandle_selected_arg_parse&s z,ActivationSelector.handle_selected_arg_parsecsfdd|jDS)Ncsg|] }|qSrr)r Zactivator_classrrrr.9sz-ActivationSelector.create..)rr8)rrrr:rcreate8szActivationSelector.create) __name__ __module__ __qualname__rr*r'r9r; __classcell__rrrrr s   rN) __future__rargparser collectionsrbaserr__all__rrrrs    4