U e{@s\ddlmZddlmZddlmZddlmZddlm Z dZ GdddeeZ dgZ d S) ) annotations)ABC)Path)Seeder)VersionTcs\eZdZddfdd ZeddddZddd d Zed d Zd dddZZ S) BaseEmbedNone)returncstj||jdkd|j|_dd|jD|_|j|_|j|_|j |_ |j |_ |j |_ |j |_ |j|_|j |_|sd|_dS)NF)enabledcSsg|]}|r|qS)existsresolve.0ir r N/opt/hc_python/lib/python3.8/site-packages/virtualenv/seed/embed/base_embed.py sz&BaseEmbed.__init__..)super__init__Zno_seeddownloadextra_search_dirpip pip_version setuptoolssetuptools_versionwheel wheel_versionZno_pipZ no_setuptoolsZno_wheelapp_datano_periodic_updateZperiodic_updatedistribution_to_versionsr )selfoptions __class__r rr s zBaseEmbed.__init__zdict[str, Version]cCstjtjtjdS)N)rrr)rZbundle)clsr r r distributions szBaseEmbed.distributionszdict[str, str]csfddDS)NcsFi|]>}td|dkrt|ddkr|t|dqS)no_F_versionnone)getattr)r distributionr r r )s z6BaseEmbed.distribution_to_versions..)r%r+r r+rr(s z"BaseEmbed.distribution_to_versionsc Cs|}|jdddddd|ddd |jd dd d d|dd d |jddtddgd|D]H\}}|jdddkr|dkrd}|jd||dd|d|dqx|D]*}|jd|d|d d|d d q|jdd d d!t d dS)"Nz --no-downloadz--never-downloadr store_falsez'pass to disable download of the latest /z from PyPIT)destactionhelpdefaultz --download store_truez&pass to enable download of the latest Fz--extra-search-dird+zPa path containing wheels to extend the internal wheel list (can be set 1+ times))metavartypenargsr1r2) >rrr(z--versionz version of z9 to install as seed: embed, bundle, none or exact version)r/r6r1r2z--no-r&zdo not install z--no-periodic-updaterzGdisable the periodic (once every 14 days) update of the embedded wheels)add_mutually_exclusive_group add_argumentjoinr%ritems version_infoPERIODIC_UPDATE_ON_BY_DEFAULT)r$parser interpreterrgroupr*r2r r radd_parser_arguments/sb  zBaseEmbed.add_parser_argumentsstrcCs|jj}|d7}|jr8|dddd|jDd7}|d|jd7}|D]T}t|d|rhqRt||d d}|d krqRd |pd }|d ||d7}qR|dddS)N(zextra_search_dir=z, css|]}t|VqdS)N)rGrr r r gsz%BaseEmbed.__repr__..,z download=r&r'r(=Zlatest ))r#__name__rr?rr%r))r resultr*r<verr r r__repr__cs" zBaseEmbed.__repr__) rO __module__ __qualname__r classmethodr%rrFrR __classcell__r r r"rr s 3rN) __future__rabcrpathlibrZvirtualenv.seed.seederrZvirtualenv.seed.wheelsrrBr__all__r r r rs     i