o
    Chm                     @  sz   d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ eeZdZG d	d
 d
e
eZd
gZdS )    )annotationsN)ABC)SUPPRESS)Path)Seeder)VersionTc                      sL   e Zd Zd fddZedddZdd	d
Zedd ZdddZ  Z	S )	BaseEmbedreturnNonec                   s   t  j||jdu d |j| _dd |jD | _|j| _|j| _|j	p$d| _
|j| _|j| _|j| _|j| _|j | _|jd d dkrT|j	d usL|jrQtd d	| _|  s]d| _d S d S )
NF)enabledc                 S  s   g | ]
}|  r| qS  )existsresolve.0ir   r   r/var/www/html/myvaluetrips/my_value_trip_new/venv/lib/python3.10/site-packages/virtualenv/seed/embed/base_embed.py
<listcomp>   s    z&BaseEmbed.__init__.<locals>.<listcomp>none      	   zThe --no-wheel and --wheel options are deprecated. They have no effect for Python > 3.8 as wheel is no longer bundled in virtualenv.T)super__init__no_seeddownloadextra_search_dirpippip_version
setuptoolssetuptools_versionwheelwheel_versionno_pipno_setuptoolsno_wheelapp_datano_periodic_updateperiodic_update
py_versionLOGGERwarningdistribution_to_versionsr   )selfoptions	__class__r   r   r      s(   

zBaseEmbed.__init__dict[str, Version]c                 C  s   t jt jt jdS )N)r   r    r"   )r   bundle)clsr   r   r   distributions0   s   zBaseEmbed.distributionsdict[str, str]c                   s    fdd   D S )Nc                   sH   i | ] }t  d | ddu rt  | ddkr|t  | dqS )no_NF_versionr   )getattr)r   distributionr.   r   r   
<dictcomp>9   s
    *z6BaseEmbed.distribution_to_versions.<locals>.<dictcomp>)r5   r;   r   r;   r   r-   8   s   
z"BaseEmbed.distribution_to_versionsc              
   C  sX  |  }|jdddddd|   ddd	 |jd
dddd|   ddd	 |jddtddg d |   D ]7\}}d| d}|jd d dkrU|dv rUd}|jd d dkrf|dkrfd }t}|jd| |d||d q<|  D ]&}d| }|jd d dkr|dkrt}|jd| d | d|dd	 qx|jd!d"dd#t d	 d S )$Nz--no-downloadz--never-downloadr   store_falsez'pass to disable download of the latest /z
 from PyPIT)destactionhelpdefaultz
--download
store_truez&pass to enable download of the latest Fz--extra-search-dird+zPa path containing wheels to extend the internal wheel list (can be set 1+ times))metavartypenargsrA   rB   zversion of z9 to install as seed: embed, bundle, none or exact versionr   )r      >   r"   r    r   r   r"   z--version)r?   rF   rA   rB   zdo not install z--no-r7   z--no-periodic-updater(   zGdisable the periodic (once every 14 days) update of the embedded wheels)	add_mutually_exclusive_groupadd_argumentjoinr5   r   itemsversion_infor   PERIODIC_UPDATE_ON_BY_DEFAULT)r4   parserinterpreterr'   groupr:   rB   help_r   r   r   add_parser_arguments?   sp   

zBaseEmbed.add_parser_argumentsstrc                 C  s   | j j}|d7 }| jr|dddd | jD  d7 }|d| j d7 }|  D ]+}t| d| d r5q)t| | d	d }|d
krCq)d|pGd }|d| | d7 }q)|d d d S )N(zextra_search_dir=z, c                 s  s    | ]}t |V  qd S )N)rV   r   r   r   r   	<genexpr>~   s    z%BaseEmbed.__repr__.<locals>.<genexpr>,z	download=r7   r8   r   =latest ))r1   __name__r   rM   r   r5   r9   )r.   resultr:   rJ   verr   r   r   __repr__z   s   "zBaseEmbed.__repr__)r	   r
   )r	   r2   )r	   r6   )r	   rV   )
r_   
__module____qualname__r   classmethodr5   r-   rU   rb   __classcell__r   r   r0   r   r      s     

:r   )
__future__r   loggingabcr   argparser   pathlibr   virtualenv.seed.seederr   virtualenv.seed.wheelsr   	getLoggerr_   r+   rP   r   __all__r   r   r   r   <module>   s    
}