| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/pip/_internal/commands/__pycache__/ |
Upload File : |
a
W��enp � @ s d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZmZ d dl m
Z
mZ d dlm
Z
d dlmZ d dlmZ d dlmZ d dlmZmZmZ d d lmZmZ d d
lmZmZ d dlmZ d dl m!Z! d d
l"m#Z# d dl$m%Z% d dl&m'Z'm(Z( d dl)m*Z* d dl+m,Z,m-Z- d dl.m/Z/ d dl0m1Z1 d dl2m3Z3 d dl4m5Z5m6Z6m7Z7m8Z8m9Z9 d dl:m;Z; d dl<m=Z=m>Z> d dl?m@Z@mAZA e3eB�ZCG dd� de�ZDd(eEeeF eeF eEeeF e
eF d�dd�ZGeeF eEeEd�d d!�ZHd)eeE eeF eeF eeF eEeEd"�d#d$�ZIeJeEeEeFd%�d&d'�ZKdS )*� N)�
SUPPRESS_HELP�Values)�List�Optional)�
print_json)�
WheelCache)�
cmdoptions)�make_target_python)�RequirementCommand�warn_if_run_as_root�with_cleanup)�ERROR�SUCCESS)�CommandError�InstallationError)�
get_scheme)�get_environment)�InstallationReport)�get_build_tracker)�ConflictDetails�check_install_conflicts)�install_given_reqs)�InstallRequirement�check_legacy_setup_py_options)�WINDOWS��test_writable_dir)� getLogger)�check_externally_managed�
ensure_dir�get_pip_version�(protect_pip_from_modification_on_windows�write_output)�
TempDirectory)�running_under_virtualenv�virtualenv_no_global)�build� should_build_for_install_commandc @ sz e Zd ZdZdZdd�dd�Zeeee e
d�dd ��Ze ee
dd
�dd�Zee ee d
�dd�Zee dd�dd�ZdS )�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> ...N)�returnc C s� | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j jdddddd� | j jddd d
d dd� t�| j � | j jd
dddd� | j jdddt d� | j jddd
d dd� | j jddd
d dd� | j �t�
� � | j jdddddd� | j jddddd gd!d"� | j jd#d$dd%d� | j jd&d'd(dd)d� | j �t�� � | j �t�� � | j �t�
� � | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j jd*dd+d,d-d� | j jd.dd+d/d0� | j jd1dd2d,d3d� | j jd4dd5d,d6d� | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j �t�� � t�tj| j�}| j�d7|� | j�d7| j � | j jd8d9d:d 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.)r- �metavarr. r/ 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.))r- r, r/ 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-neededZeageraG 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).)r- r. �choicesr/ 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)r, r- r/ 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.)Zcmd_optsZ
add_optionr �requirements�constraintsZno_depsZpreZeditableZadd_target_python_optionsr �src�ignore_requires_pythonZno_build_isolation�
use_pep517Z
no_use_pep517Zcheck_build_deps�override_externally_managedZconfig_settings�global_optionsZ no_binaryZonly_binaryZ
prefer_binaryZrequire_hashesZprogress_bar�root_user_actionZmake_option_groupZindex_group�parserZinsert_option_group)�selfZ
index_opts� rK �B/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py�add_optionsH s ��
��������
������zInstallCommand.add_options)�options�argsr) c * C s� |j r|jd urtd��|jo"|j oB|jd u oB|jd u oB|jd u }|rT|jsTt� d}|j rd|j
}tj|dd� t
�dt� � t|j |j|j|j|jd�|_ d }d }|j�rd|_tj�|j�|_tj�|j�r�tj�|j�s�td��tdd �}|j}| �|� |j�pg }| �|�}t|�} | j||| |jd
�}
| �t� �}t|j ddd�}�z| �!|||
|�}
t"||
� t#|j$�}|
D ]}d|_%�q~| j&|||||
|j | j'd
�}| j(||
|||j |j|j|j)||j*d�
}| �+|
� |j,|
|j d�}|j�rbt-|j.�}|jdk�rt/|�0� d� nHt1|jddd��&}t2j3|�0� |ddd� W d � n1 �sX0 Y |j�r�|�4� t5dd� |j.D ��}|�r�t6dd�7dd� |D ��� t8W S z|�9d�}W n t:�y� d}Y n0 |j;d u }t<|d� dd � |j=�>� D �}t?||dg |d!�\}}|�r6t@d"�Ad#�7d$d� |D �����|�B|�}d }|jC �oR|jD}|�rd| �E|�}|jF}|j�sz|j�r~d}tG|||j||j||j |jHd%�}tI|j ||j|j|jd&�} tJ| �}!|jKtL�Md'�d(� g }"|D ]T}#|#jN}$z(|!�O|$�}%|%d u�r
|$� d|%jP� �}$W n tQ�y Y n0 |"�R|$� �q�|d u�rN| jS|| �T|�d)� d�7|"�}&|&�rht6d*|&� W nP tU�y� }' z6| j'd+k}(tV|'|(|j �})t
jW|)|(d,� tXW Y d }'~'S d }'~'0 0 |j�r�|�s�J �| �Y|j||j � |jZd-k�r�t[� t8S ).Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT)Zcheck_targetzUsing %s)r6 r0 r5 �
isolated_modez=Target path exists but is not a directory, will not continue.�target)�kind)rN �session�
target_pythonrD �install)�deleterR Zglobally_managed)Ztemp_build_dirrN �
build_trackerrS �finderr3 � verbosity)
�preparerrX rN �wheel_cacher3 r; rD r: r8 rE )Zcheck_supported_wheels�-)�data�wzutf-8)�encoding� F)�indentZensure_asciic s s"