| 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.7/site-packages/pip/_internal/commands/__pycache__/ |
Upload File : |
B
�N�a�l � @ sH d dl Z d dlZd dlZd dlZd dlZd dlmZmZ d dlm Z 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%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z, d dl-m.Z. d dl/m0Z0 d dl1m2Z2 d dl3m4Z4 d dl5m6Z6m7Z7m8Z8m9Z9 d dl:m;Z; d dl<m=Z=m>Z> d dl?m@Z@mAZAmBZB e4eC�ZDe#e@d�dd�ZEG dd� de�ZFd/eGeeH eeH eGeeH e
eH d �d!d"�ZIeeH eGeGd#�d$d%�ZJd0eeG eeH eeH eeH eGeGd&�d'd(�ZKe
e* ee
eH dd)�d*d+�ZLeMeGeGeHd,�d-d.�ZNdS )1� N)�
SUPPRESS_HELP�Values)�Iterable�List�Optional)�canonicalize_name)�
WheelCache)�
cmdoptions)�make_target_python)�RequirementCommand�warn_if_run_as_root�with_cleanup)�ERROR�SUCCESS)�CommandError�InstallationError)�
get_scheme)�get_environment)�
FormatControl)�ConflictDetails�check_install_conflicts)�install_given_reqs)�InstallRequirement)�get_requirement_tracker)�WINDOWS)�parse_distutils_args)�test_writable_dir)� getLogger)�
ensure_dir�get_pip_version�(protect_pip_from_modification_on_windows�write_output)�
TempDirectory)�running_under_virtualenv�virtualenv_no_global)�BinaryAllowedPredicate�build� should_build_for_install_command)�format_control�returnc s t td�� fdd�}|S )N)�reqr) c s t | jp
d�}� �|�}d|kS )N� Zbinary)r �nameZget_allowed_formats)r* Zcanonical_nameZallowed_formats)r( � �B/usr/lib/python3.7/site-packages/pip/_internal/commands/install.py�check_binary_allowed5 s
z6get_check_binary_allowed.<locals>.check_binary_allowed)r �bool)r( r/ r- )r( r. �get_check_binary_allowed4 s r1 c @ 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)r) c C sj | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j jddddd dd� t�| j � | j jddd d
d� | j jddd
t d� | j jdddd dd� | j jdddd dd� | j �t�
� � | j jdddd dd� | j jdddddgdd� | j jddd d d� | j jd!d"d#d d$d� | j �t�� � | j �t�� � | j �t�
� � | j �t�� � | j �t�� � | j �t�� � | j jd%d d&d'd(d)� | j jd*d
d&d+d,� | j jd-d
d.d'd/d)� | j jd0d
d1d'd2d)� | j �t�� � | j �t�� � | j �t�� � | j �t�� � | j �t�� � t�tj| j�}| j�d3|� | j�d3| j � d S )4Nz-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.)�dest�metavar�default�helpz--user�
use_user_site�
store_truez�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.))r5 �actionr8 z --no-user�store_falsez--root� root_pathz=Install everything relative to this alternate root directory.z--prefix�prefix_pathzIInstallation prefix where lib, bin and other top-level folders are placedz-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).)r5 r7 �choicesr8 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 bytecode)r; r5 r7 r8 z--no-compilez.Do not compile Python source files to bytecode)r; r5 r8 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 )Zcmd_optsZ
add_optionr �requirementsZconstraintsZno_depsZpreZeditableZadd_target_python_optionsr �src�ignore_requires_pythonZno_build_isolation�
use_pep517Z
no_use_pep517�install_options�global_optionsZ no_binaryZonly_binaryZ
prefer_binaryZrequire_hashesZprogress_barZmake_option_groupZindex_group�parserZinsert_option_group)�selfZ
index_optsr- r- r. �add_optionsQ s�
zInstallCommand.add_options)�options�argsr) c ) s8 |j r|jd k rtd��t�|� d}|jr2|j}tj|dd� |jpHg }t �
dt� � t|j |j
|j|j|jd�|_ d }d }|jr�d|_tj�|j�|_tj�|j�r�tj�|j�s�td��tdd �}|j}| �|� |jp�g }| �|�}t|�} | j||| |jd
�}
t|j|j�}| �t � �}t|j! ddd�}
�y�| �"|||
|�}x|D ]}d|_#�qNW t$||j� | j%|
||||
|j d
�}| j&||
|||j |j|j|j'||j(d�
}| �)|
� |j*||j d�}y|�+d�}W n t,k
�r� d}Y nX |j-d k}t.|d� t/|
j�� � fdd�|j0�1� D �}t2||dg g d�\}}dd� |D �}|�rdt3d�4d�5|����x|D ]}|j(�sjd|_6�qjW |�7|�}d }|j8 �o�|j9}|�r�| �:|�}|j;}|j�s�|j
�r�d}t<||||j||j
||j |j=d� }t>|j ||j|j
|jd�}t?|�} |j@tA�Bd�d� g }!x^|D ]V}"|"jC}#y(| �D|#�}$|$d k �rZ|#� d|$jE� �}#W n tFk
�rr Y nX |!�G|#� �q*W |d k �r�| jH|| �I|�d� d �5|!�}%|%�r�tJd!|%� W nJ tKk
�r }& z*| jLd"k}'tM|&|'|j �}(t jN|(|'d#� tOS d }&~&X Y nX |j�r.|�stP�| �Q|j||j� tR� tSS )$Nz'Can not combine '--user' and '--target'zto-satisfy-onlyT)Zcheck_targetzUsing %s)r>