a
    i
                     @   s   d dl Z d dlZd dlmZmZmZ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G d	d
 d
Zee eeeef  dddZee ee ee ee ee ee eeeee d
ddZdS )    N)IteratorListOptionalSequenceTuple)
indent_log   )parse_requirements)InstallRequirement)RequirementSet)r   r
   r	   install_given_reqsc                   @   s*   e Zd ZeddddZedddZdS )InstallationResultN)namereturnc                 C   s
   || _ d S )Nr   )selfr    r   \/home/ec2-user/npost_license/.venv/lib/python3.9/site-packages/pip/_internal/req/__init__.py__init__   s    zInstallationResult.__init__)r   c                 C   s   d| j dS )NzInstallationResult(name=)r   )r   r   r   r   __repr__   s    zInstallationResult.__repr__)__name__
__module____qualname__strr   r   r   r   r   r   r      s   r   )requirementsr   c                 c   s.   | 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   )
r   install_optionsglobal_optionsroothomeprefixwarn_script_locationuse_user_site	pycompiler   c	                 C   s  t t| }	|	r(tdd|	  g }
t  |	 D ]\}}|j	rtd| t  |j
dd}W d   q1 s~0    Y  nd}z|j||||||||d W n& ty   |r|js|   Y n0 |r|jr|  |
t| q<W d   n1 s0    Y  |
S )zu
    Install everything in the given list.

    (to be called after having downloaded and unpacked the packages)
    z!Installing collected packages: %sz, zAttempting uninstall: %sT)auto_confirmN)r    r!   r"   r#   r$   r%   )collectionsOrderedDictr   loggerinfojoinkeysr   itemsshould_reinstall	uninstallinstall	Exceptioninstall_succeededrollbackcommitappendr   )r   r   r   r    r!   r"   r#   r$   r%   
to_install	installedreq_namerequirementuninstalled_pathsetr   r   r   r   %   sB    ,



0r   )r'   loggingtypingr   r   r   r   r   pip._internal.utils.loggingr   req_filer	   req_installr
   req_setr   __all__	getLoggerr   r)   r   r   r   boolr   r   r   r   r   <module>   s.   
		