B aV@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)VersionTcsLeZdZfddZeddZddZeddZd d Zd d Z Z S) BaseEmbedcstt|j||jdkd|j|_dd|jD|_|j|_|j|_ |j |_ |j |_ |j |_ |j|_|j|_|j |_|sd|_dS)NF)enabledcSsg|]}|r|qS)existsresolve).0irrQ/opt/alt/python37/lib/python3.7/site-packages/virtualenv/seed/embed/base_embed.py sz&BaseEmbed.__init__..)superr __init__Zno_seeddownloadextra_search_dirpipZ pip_version setuptoolsZsetuptools_versionwheel wheel_versionZno_pipZ no_setuptoolsZno_wheelapp_datano_periodic_updateZperiodic_updatedistribution_to_versionsr )selfoptions) __class__rrrs zBaseEmbed.__init__cCstjtjtjdS)N)rrr)r Zbundle)clsrrr distributions%szBaseEmbed.distributionscsfddDS)Ncs2i|]*}td|dkrtd||qS)zno_{}Fz {}_version)getattrformat)r distribution)r rr .sz6BaseEmbed.distribution_to_versions..)r$)r r)r rr-s z"BaseEmbed.distribution_to_versionsc Cs|}|jdddddd|dd|jd dd d d|d d|jd dtddgdx8|D](\}}|jd||dd||dqvWx6|D]*}|jd|d|d d|d dqW|jddd dt ddS)Nz --no-downloadz--never-downloadrZ 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)r*r1r,r-z--no-{}zno_{}zdo not install {}z--no-periodic-updaterzGdisable the periodic (once every 14 days) update of the embedded wheels)add_mutually_exclusive_group add_argumentr&joinr$ritemsPERIODIC_UPDATE_ON_BY_DEFAULT)r#parser interpreterrgroupr'r-rrradd_parser_arguments4sR  zBaseEmbed.add_parser_argumentsc Cs|jj}|d7}|jr6|dddd|jD7}|d|j7}xJ|D]>}t|d|rfqP|d|d t|d |dpd 7}qPW|dd d S)N(zextra_search_dir={},z, css|]}tt|VqdS)N)rstr)rrrrr jsz(BaseEmbed.__unicode__..z download={},zno_{}z {}{},z={}z {}_versionZlatest))r"__name__rr&r7rr$r%)r resultr'rrr __unicode__fs $zBaseEmbed.__unicode__cCs t|S)N)rrE)r rrr__repr__uszBaseEmbed.__repr__) rC __module__ __qualname__r classmethodr$rr=rErF __classcell__rr)r"rr s    2r N) __future__rrabcrZsixrZvirtualenv.util.pathrZvirtualenv.util.sixrrZseederr Zwheelsr r9r rrrrs