B a@sddlmZmZddlZddlmZejdkr@ddlmZdZ n4ddl mZm Z e dd e d  d dd DZ Gd ddeZGdddeZdS))absolute_importunicode_literalsN) OrderedDict)) entry_points)rversionccs|]}t|VqdS)N)int).0irrK/opt/alt/python37/lib/python3.7/site-packages/virtualenv/run/plugin/base.py srimportlib_metadata.c@s,eZdZdZdZeddZeddZdS) PluginLoaderNcCsRtjdkstdkr0tdd|j|dDStdd||iDSdS)N)r )rcss|]}|j|fVqdS)N)nameload)r errr rsz0PluginLoader.entry_points_for..)groupcss|]}|j|fVqdS)N)rr)r rrrr rs)sys version_infoimportlib_metadata_versionrrselectget)clskeyrrr entry_points_forszPluginLoader.entry_points_forcCstjdkrtt_tjS)N)r _ENTRY_POINTSrrrrr rs zPluginLoader.entry_points) __name__ __module__ __qualname___OPTIONSr! classmethodr staticmethodrrrrr rs rc@s@eZdZddZeddZddZddZd d Zd d Z d S)ComponentBuildercCs<||_||_d|_||_|j|d|_||t|jdS)N)title) interpreterr _impl_classpossibleadd_argument_groupparseradd_selector_arg_parselist)selfr*r.rr,rrr __init__#s zComponentBuilder.__init__cCs|jdkr|||_|jS)N)r%r )rrrrr options+s  zComponentBuilder.optionscCstdS)N)NotImplementedError)r1rchoicesrrr r/1sz'ComponentBuilder.add_selector_arg_parsecCsDt||j}||jkr&td|j|j||_|||j|S)NzNo implementation for {}) getattrrr, RuntimeErrorformatr*r+populate_selected_argparseapp_data)r1r3selectedrrr handle_selected_arg_parse4s    z*ComponentBuilder.handle_selected_arg_parsecCs*d|j||j_|j|j|j|dS)Nzoptions for {} {})r8rr. descriptionr+Zadd_parser_argumentsr*)r1r;r:rrr r9<sz+ComponentBuilder.populate_selected_argparsecCs|||jS)N)r+r*)r1r3rrr create@szComponentBuilder.createN) r"r#r$r2r&r3r/r<r9r>rrrr r("s  r() __future__rrr collectionsrrZimportlib.metadatarrrr tuplesplitobjectrr(rrrr s   $