File: D:/Python311/Lib/site-packages/pip/_internal/commands/__pycache__/install.cpython-311.pyc
�
�miw � � � d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlm Z m
Z
d dlmZ d dl
mZ d dlmZ d dlmZ d dlZd dlmZ d d lmZ d d
lmZ d dlmZmZ d dlmZm Z d d
l!m"Z"m#Z#m$Z$ d dl%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z, d dl-m.Z.m/Z/ d dl0m1Z1 d dl2m3Z3 d dl4m5Z5 d dl6m7Z7 d dl8m9Z9 d dl:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@ d dlAmBZB d dlCmDZDmEZE d dlFmGZG e9eH� � ZI G d� de� � ZJ d7d8d(�ZKd9d)�ZL d:d;d0�ZMd<d6�ZNdS )=� )�annotationsN)�
SUPPRESS_HELP�Values)�Path)�canonicalize_name)�InvalidProxyURL)�
print_json)�
WheelCache)�
cmdoptions)�make_target_python)�RequirementCommand�with_cleanup)�ERROR�SUCCESS)�CommandError�InstallationError�InstallWheelBuildError)�
get_scheme)�get_environment)�InstallationReport)�get_build_tracker)�ConflictDetails�check_install_conflicts)�install_given_reqs)�InstallRequirement)�WINDOWS��test_writable_dir)� getLogger)�check_externally_managed�
ensure_dir�get_pip_version�(protect_pip_from_modification_on_windows�warn_if_run_as_root�write_output)�
TempDirectory)�running_under_virtualenv�virtualenv_no_global)�buildc �N � e Zd ZdZdZdd�Zedd�� � Zdd�Zdd�Z d d�Z
dS )!�InstallCommandaI
Install packages from:
- PyPI (and other indexes) using requirement specifiers.
- VCS project urls.
- Local project directories.
- Local or remote source archives.
pip also supports installing from "requirements files", which provide
an easy way to specify a whole environment to be installed.
a%
%prog [options] <requirement specifier> [package-index-options] ...
%prog [options] -r <requirements file> [package-index-options] ...
%prog [options] [-e] <vcs project url> ...
%prog [options] [-e] <local project path> ...
%prog [options] <archive url/path> ...�return�Nonec � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � ddddd�� � | j � ddd d
d d�� � t j | j � � | j � d
ddd�� � | j � dddt �� � | j � ddd
d d�� � | j � ddd
d d�� � | j � t j � � � � | j � ddddd�� � | j � ddddd gd!�"� � | j � d#d$dd%�� � | j � d&d'd(dd)�� � | j � t j � � � � | j � t j
� � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � d*dd+d,d-�� � | j � d.dd+d/�0� � | j � d1dd2d,d3�� � | j � d4dd5d,d6�� � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � | j � t j � � � � t j t j | j � � }| j � d7|� � | j � d7| j � � | j � d8d9d:d d;�� � d S )<Nz --dry-run�
store_true�dry_runFz�Don't actually install anything, just print what would be. Can be used in combination with --ignore-installed to 'resolve' the requirements.)�action�dest�default�helpz-tz--target�
target_dir�dirz�Install packages into <dir>. By default this will not replace existing files/folders in <dir>. Use --upgrade to replace existing packages in <dir> with new versions.)r2 �metavarr3 r4 z--user�
use_user_sitez�Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on Windows. (See the Python documentation for site.USER_BASE for full details.))r2 r1 r4 z --no-user�store_falsez--root� root_pathz=Install everything relative to this alternate root directory.z--prefix�prefix_patha[ Installation prefix where lib, bin and other top-level folders are placed. Note that the resulting installation may contain scripts and other resources which reference the Python interpreter of pip, and not that of ``--prefix``. See also the ``--python`` option if the intention is to install packages into another (possibly pip-free) environment.z-Uz --upgrade�upgradez�Upgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.z--upgrade-strategy�upgrade_strategyzonly-if-needed�eageraG Determines how dependency upgrading should be handled [default: %default]. "eager" - dependencies are upgraded regardless of whether the currently installed version satisfies the requirements of the upgraded package(s). "only-if-needed" - are upgraded only when they do not satisfy the requirements of the upgraded package(s).)r2 r3 �choicesr4 z--force-reinstall�force_reinstallz;Reinstall all packages even if they are already up-to-date.z-Iz--ignore-installed�ignore_installedz�Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!z --compile�compileTz'Compile Python source files to bytecodez--no-compilez.Do not compile Python source files to bytecode)r1 r2 r4 z--no-warn-script-location�warn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflicts�warn_about_conflictsz%Do not warn about broken dependenciesr z--report�json_report_file�fileaW Generate a JSON file describing what pip did to install the provided requirements. Can be used in combination with --dry-run and --ignore-installed to 'resolve' the requirements. When - is used as file name it writes to stdout. When writing to stdout, please combine with the --quiet option to avoid mixing pip logging output with JSON output.)�cmd_opts�
add_optionr �requirements�constraints�build_constraints�no_deps�pre�editable�add_target_python_optionsr �src�ignore_requires_python�no_build_isolation�
use_pep517�check_build_deps�override_externally_managed�config_settings� no_binary�only_binary�
prefer_binary�require_hashes�progress_bar�root_user_action�make_option_group�index_group�parser�insert_option_group)�self�
index_optss �@D:\Python311\Lib\site-packages\pip/_internal/commands/install.py�add_optionszInstallCommand.add_optionsV s� � ��
� � ��!8�!:�!:�;�;�;��
� � ��!7�!9�!9�:�:�:��
� � ��!=�!?�!?�@�@�@��
� � ��!3�!5�!5�6�6�6��
� � ���!1�!1�2�2�2��
� � ��!4�!6�!6�7�7�7��
� � �����1�
!�
�
�
�
�
� � ������%� !�
�
�
� �,�T�]�;�;�;��
� � �� ��%� !�
�
�
�
�
� � �� � �� !�
�
�
�
�
� � �����P� !�
�
�
�
�
� � ������
!�
�
�
�
�
� � ���!1�!1�2�2�2��
� � �����)�
!�
�
�
�
�
� � � �#�$�%�w�/�G�
!�
�
�
�
�
� � ��"��N� !�
�
�
�
�
� � �� �#��4�
!�
�
�
�
�
� � ��!B�!D�!D�E�E�E��
� � ��!>�!@�!@�A�A�A��
� � ��!6�!8�!8�9�9�9��
� � ��!<�!>�!>�?�?�?��
� � ��!G�!I�!I�J�J�J��
� � ��!;�!=�!=�>�>�>��
� � �����:� !�
�
�
�
�
� � �� ��A� !�
�
�
�
�
� � �'� �'��C� !�
�
�
�
�
� � �!� �'��8� !�
�
�
�
�
� � ��!5�!7�!7�8�8�8��
� � ��!7�!9�!9�:�:�:��
� � ��!9�!;�!;�<�<�<��
� � ��!:�!<�!<�=�=�=��
� � ��!8�!:�!:�;�;�;��
� � ��!<�!>�!>�?�?�?��1��"��K�
�
�
�
��'�'��:�6�6�6���'�'��4�=�9�9�9��
� � ��#���G�
!�
�
�
�
�
� �optionsr �args� list[str]�intc ��
� |j r|j �t d� � �|j o|j o|j d u o|j d u o|j d u }|r|j st � � d}|j r|j
}t j |� � t j
|d�� � t � dt! � � � � t# |j |j |j |j |j �� � |_ d }d }|j r�d|_ t( j � |j � � |_ t( j � |j � � r3t( j � |j � � st d� � �t3 d� � � }|j }| � |� � | � |� � }t9 |� � }| � ||||j �
� � } | � t? � � � � }
t3 |j dd�� � } | �! ||| |� � }tE |j# � � }
|D ] }d|_$ �
| �% |||
|| |j | j&