
    .Phm                        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j        e          ZdZ G d	 d
e
e          Zd
gZdS )    )annotationsN)ABC)SUPPRESS)Path)Seeder)VersionTc                  ^     e Zd Zd fdZedd            ZddZed             Zdd
Z xZ	S )	BaseEmbedreturnNonec                $   t                                          ||j        du            |j        | _        d |j        D             | _        |j        | _        |j        | _        |j	        pd| _
        |j        | _        |j        | _        |j        | _        |j        | _        |j         | _        |j        d d         dk    r/|j	        |j        rt$                              d           d| _        |                                 s	d| _        d S d S )	NF)enabledc                ^    g | ]*}|                                 |                                +S  )existsresolve.0is     `/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/virtualenv/seed/embed/base_embed.py
<listcomp>z&BaseEmbed.__init__.<locals>.<listcomp>   s2     ] ] ]RSRZRZR\R\ ] ] ] ]    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__s     r   r   zBaseEmbed.__init__   s   '/U*BCCC( ] ]g6N ] ] ]";")"4
 %]4fn$2((#*#==bqb!V++}(G,<(-  
 !DM,,.. 	! DLLL	! 	!r   dict[str, Version]c                J    t           j        t           j        t           j        dS )N)r#   r%   r'   )r   bundle)clss    r   distributionszBaseEmbed.distributions0   s"     >!.^
 
 	
r   dict[str, str]c                D      fd                                  D             S )Nc                    i | ]C}t          d | d          du t          | d          dk    /|t          | d          DS )no_NF_versionr   )getattr)r   distributionr3   s     r   
<dictcomp>z6BaseEmbed.distribution_to_versions.<locals>.<dictcomp>9   sw     
 
 
t1<11488EAAgdWcTmTmTmFnFnrxFxFx '$<(A(A(ABBFxFxFxr   )r:   )r3   s   `r   r2   z"BaseEmbed.distribution_to_versions8   s:    
 
 
 
 $ 2 2 4 4
 
 
 	
r   c                   |                                 }|                    dddddd                    |                                            dd	           |                    d
dddd                    |                                            dd	           |                    ddt          ddg            |                                                                 D ]c\  }}d| d}|j        d d         dk    r|dv rd}|j        d d         dk    r|dk    r	d }t          }|                    d| |d||           d|                                 D ]G}d| }|j        d d         dk    r|dk    rt          }|                    d| d | d|d	           H|                    d!d"dd#t           	           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nargsrH   rI   zversion of z9 to install as seed: embed, bundle, none or exact versionr   )r      >   r'   r%   r   r   r'   z--version)rF   rM   rH   rI   zdo not install z--no-r>   z--no-periodic-updater-   zGdisable the periodic (once every 14 days) update of the embedded wheels)	add_mutually_exclusive_groupadd_argumentjoinr:   r   itemsversion_infor   PERIODIC_UPDATE_ON_BY_DEFAULT)r9   parserinterpreterr,   grouprA   rI   help_s           r   add_parser_argumentszBaseEmbed.add_parser_arguments?   s|   3355 d388CDUDUDWDW;X;Xddd 	 	
 	
 	
 	c#((3CTCTCVCV:W:Wccc 	 	
 	
 	
 	 c 	 	
 	
 	
 &)%6%6%8%8%>%>%@%@ 	 	!L'i,iiiE'+w66<Kb;b;b '+v55,':Q:Q #\##!!        --// 
	 
	L4l44E'+v55,':Q:Q &&&)<))#       	"%Z55 	 	
 	
 	
 	
 	
r   strc                p   | j         j        }|dz  }| j        r+|dd                    d | j        D                        dz  }|d| j         dz  }|                                 D ]D}t          | d| d           rt          | | dd           }|d	k    r2d
|pd }|d| | dz  }E|d d         dz   S )N(zextra_search_dir=z, c              3  4   K   | ]}t          |          V  d S )N)r]   r   s     r   	<genexpr>z%BaseEmbed.__repr__.<locals>.<genexpr>~   s(      3Z3ZqCFF3Z3Z3Z3Z3Z3Zr   ,z	download=r>   r?   r   =latest ))r5   __name__r"   rT   r!   r:   r@   )r3   resultrA   rQ   vers        r   __repr__zBaseEmbed.__repr__z   s   (#  	^]$))3Z3ZDDY3Z3Z3Z*Z*Z]]]]F.dm.... ..00 	/ 	/Lt1<11488 d|$=$=$=tDDG&  +g)++C.,.....FFcrc{S  r   )r   r   )r   r6   )r   r;   )r   r]   )
rh   
__module____qualname__r   classmethodr:   r2   r\   rk   __classcell__)r5   s   @r   r
   r
      s        ! ! ! ! ! !@ 
 
 
 [

 
 
 
 8
 8
 [8
t! ! ! ! ! ! ! !r   r
   )
__future__r   loggingabcr   argparser   pathlibr   virtualenv.seed.seederr   virtualenv.seed.wheelsr   	getLoggerrh   r0   rW   r
   __all__r   r   r   <module>ry      s    " " " " " "                    ) ) ) ) ) ) * * * * * *		8	$	$ $ y! y! y! y! y! y! y! y!z r   