o $"bW@s|ddlmZmZddlmZddlmZddlmZddl m Z m Z ddl m Z ddlmZd ZeeGd d d e Zd S) )absolute_importunicode_literals)ABCMeta) add_metaclass)Path) ensure_str ensure_text)Seeder)VersionFcsLeZdZfddZeddZddZeddZd d Zd d Z Z S) BaseEmbedcstt|j||jdud|j|_dd|jD|_|j|_|j|_ |j |_ |j |_ |j |_ |j|_|j|_|j |_|sDd|_dSdS)NF)enabledcSsg|] }|r|qS)existsresolve.0irrB/usr/lib/python3/dist-packages/virtualenv/seed/embed/base_embed.py sz&BaseEmbed.__init__..)superr __init__no_seeddownloadextra_search_dirpip pip_version setuptoolssetuptools_versionwheel wheel_versionno_pip no_setuptoolsno_wheelapp_datano_periodic_updateperiodic_updatedistribution_to_versionsr )selfoptions __class__rrrs  zBaseEmbed.__init__cCstjtjtjdS)N)rrr)r bundle)clsrrr distributions%szBaseEmbed.distributionscsfddDS)Ncs2i|]}td|dur|td|qS)no_{}F {}_version)getattrformat)r distributionr(rr .s z6BaseEmbed.distribution_to_versions..)r.r4rr4rr'-s z"BaseEmbed.distribution_to_versionsc Cs|}|jdddddd|dd|jd dd d d|d d|jd dtddgd|D]\}}|jd||dd||dq:|D]}|jd|d|d d|d dqS|jddd dt ddS)Nz --no-downloadz--never-downloadr store_falsez3pass to disable download of the latest {} from PyPI/T)destactionhelpdefaultz --download store_truez2pass to enable download of the latest {} from PyPIFz--extra-search-dird+zPa path containing wheels to extend the internal wheel list (can be set 1+ times))metavartypenargsr:r;z--{}versionz@version of {} to install as seed: embed, bundle or exact version)r8r?r:r;z--no-{}r/zdo not install {}z--no-periodic-updater%zGdisable the periodic (once every 14 days) update of the embedded wheels)add_mutually_exclusive_group add_argumentr2joinr.ritemsPERIODIC_UPDATE_ON_BY_DEFAULT)r-parser interpreterr$groupr3r;rrradd_parser_arguments4s^  zBaseEmbed.add_parser_argumentsc Cs|jj}|d7}|jr|dddd|jD7}|d|j7}|D]}t|d|r2q'|d|d t|d |dpBd 7}q'|dd d S)N(zextra_search_dir={},z, css|] }tt|VqdSN)rstrrrrr jsz(BaseEmbed.__unicode__..z download={},r/z {}{},z={}r0latest))r+__name__rr2rErr.r1)r(resultr3rrr __unicode__fs  zBaseEmbed.__unicode__cCs t|SrM)rrUr4rrr__repr__us zBaseEmbed.__repr__) rS __module__ __qualname__r classmethodr.r'rKrUrV __classcell__rrr*rr s   1r N) __future__rrabcrsixrvirtualenv.util.pathrvirtualenv.util.sixrrseederr wheelsr rGr rrrrs