o
    h2                     @  s   d dl mZ d dlZd dlZd dlmZmZ d dlmZ d dl	m
Z
mZ d dlmZ ddlmZ dd	lmZ dd
lmZ g dZeeZeddG dd dZd%ddZd&d#d$ZdS )'    )annotationsN)	GeneratorSequence)	dataclass)BarTypeget_install_progress_renderer)
indent_log   )parse_requirements)InstallRequirement)RequirementSet)r   r   r
   install_given_reqsT)frozenc                   @  s   e Zd ZU ded< dS )InstallationResultstrnameN)__name__
__module____qualname____annotations__ r   r   M/var/www/html/venv/lib/python3.10/site-packages/pip/_internal/req/__init__.pyr      s   
 r   requirementslist[InstallRequirement]return5Generator[tuple[str, InstallRequirement], None, None]c                 c  s0    | D ]}|j sJ d| |j |fV  qd S )Nz%invalid to-be-installed requirement: )r   )r   reqr   r   r   _validate_requirements   s
   r   global_optionsSequence[str]root
str | Nonehomeprefixwarn_script_locationbooluse_user_site	pycompileprogress_barr   list[InstallationResult]c	                 C  s^  t t| }	|	rtdd|	  g }
ttj	o!t
|	dk}t|	 }|r6t|t
|	d}||}t l |D ]`}|j}|dusGJ |jrjtd| t  |jdd}W d   n1 sdw   Y  nd}z|j|||||||d	 W n ty   |r|js|   w |r|jr|  |
t| q<W d   |
S 1 sw   Y  |
S )
zu
    Install everything in the given list.

    (to be called after having downloaded and unpacked the packages)
    z!Installing collected packages: %sz, r	   )bar_typetotalNzAttempting uninstall: %sT)auto_confirm)r    r"   r#   r$   r&   r'   )collectionsOrderedDictr   loggerinfojoinkeysisEnabledForloggingINFOlenitervaluesr   r   r   should_reinstall	uninstallinstall	Exceptioninstall_succeededrollbackcommitappendr   )r   r   r    r"   r#   r$   r&   r'   r(   
to_install	installedshow_progressitemsrendererrequirementreq_nameuninstalled_pathsetr   r   r   r   &   s`   
	


  r   )r   r   r   r   )r   r   r   r   r    r!   r"   r!   r#   r!   r$   r%   r&   r%   r'   r%   r(   r   r   r)   )
__future__r   r-   r4   collections.abcr   r   dataclassesr   pip._internal.cli.progress_barsr   r   pip._internal.utils.loggingr   req_filer
   req_installr   req_setr   __all__	getLoggerr   r/   r   r   r   r   r   r   r   <module>   s     

