o
    Uh	                     @  sP   d dl mZ d dlZd dlZeeZG dd dZdZG dd dZ	dgZ
dS )    )annotationsNc                   @  s   e Zd ZdZdddZedd Zedd	 Zed
d Zedd Z	edd Z
dd Zdd Zdd Zdd Zdd Zdd ZdS )Sessionz2Represents a virtual environment creation session.returnNonec                 C  s(   || _ || _|| _|| _|| _|| _d S N)
_verbosity	_app_data_interpreter_creator_seeder_activators)self	verbosityapp_datainterpretercreatorseeder
activators r   j/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/virtualenv/run/session.py__init__   s   
zSession.__init__c                 C     | j S )zThe verbosity of the run.)r   r   r   r   r   r         zSession.verbosityc                 C  r   )zACreate a virtual environment based on this reference interpreter.)r	   r   r   r   r   r      r   zSession.interpreterc                 C  r   )z\The creator used to build the virtual environment (must be compatible with the interpreter).)r
   r   r   r   r   r      r   zSession.creatorc                 C  r   )zIThe mechanism used to provide the seed packages (pip, setuptools, wheel).)r   r   r   r   r   r   #   r   zSession.seederc                 C  r   )z0Activators used to generate activations scripts.)r   r   r   r   r   r   (   r   zSession.activatorsc                 C  s(   |    |   |   | jj  d S r   )_create_seed	_activater   	pyenv_cfgwriter   r   r   r   run-   s   zSession.runc                 C  s8   t d| j | j  t t t dt| j d S )Nz!create virtual environment via %sz%s)LOGGERinfor   r   debug_DEBUG_MARKER_Debugr   r   r   r   r   3   s   

zSession._createc                 C  s:   | j d ur| j jrtd| j  | j | j d S d S d S )Nzadd seed packages via %s)r   enabledr    r!   r   r   r   r   r   r   r   9   s   zSession._seedc                 C  sH   | j r ddd | j D }td| | j D ]
}|| j qd S d S )Nz, c                 s  s"    | ]}t |jd dV  qdS )	Activator N)type__name__replace).0ir   r   r   	<genexpr>@   s     z$Session._activate.<locals>.<genexpr>zadd activators for %s)r   joinr    r!   generater   )r   active	activatorr   r   r   r   >   s   
zSession._activatec                 C  s   | S r   r   r   r   r   r   	__enter__E   s   zSession.__enter__c                 C  s   | j   d S r   )r   close)r   exc_typeexc_valexc_tbr   r   r   __exit__H   s   zSession.__exit__Nr   r   )r)   
__module____qualname____doc__r   propertyr   r   r   r   r   r   r   r   r   r2   r7   r   r   r   r   r   	   s&    





r   zJ============================== target debug ==============================c                   @  s$   e Zd ZdZd
ddZdddZd	S )r$   zlazily populate debug.r   r   c                 C  s
   || _ d S r   )r   )r   r   r   r   r   r   R   s   
z_Debug.__init__strc                 C  s   t j| jjddS )N   )indent)jsondumpsr   r"   r   r   r   r   __repr__U   s   z_Debug.__repr__Nr8   )r   r=   )r)   r9   r:   r;   r   rB   r   r   r   r   r$   O   s    
r$   )
__future__r   r@   logging	getLoggerr)   r    r   r#   r$   __all__r   r   r   r   <module>   s    
C