U
ʗRekv @ sh d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZmZ d dl m
Z
mZmZ d dl
mZ d dlmZ d dlmZ d dlmZ d dlmZ d d lmZmZmZ d d
lmZmZ d dlmZm Z d dl!m"Z" d d
l#m$Z$ d dl%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z,m-Z- d dl.m/Z/ d dl0m1Z1 d dl2m3Z3 d dl4m5Z5 d dl6m7Z7 d dl8m9Z9 d dl:m;Z;mZ> d dl?m@Z@ d dlAmBZBmCZC d dlDmEZEmFZFmGZG e9eHZIe&eEdddZJG dd d eZKd1eLeeM eeM eLeeM eeM d"d#d$ZNeeM eLeLd%d&d'ZOd2eeL eeM eeM eeM eLeLd(d)d*ZPee1 eeeM dd+d,d-ZQeReLeLeMd.d/d0ZSdS )3 N)
SUPPRESS_HELPValues)IterableListOptional)canonicalize_name)
print_json)
WheelCache)
cmdoptions)make_target_python)RequirementCommandwarn_if_run_as_rootwith_cleanup)ERRORSUCCESS)CommandErrorInstallationError)
get_scheme)get_environment)
FormatControl)InstallationReport)get_build_tracker)ConflictDetailscheck_install_conflicts)install_given_reqs)InstallRequirement)WINDOWS)parse_distutils_argstest_writable_dir) getLogger)
ensure_dirget_pip_version(protect_pip_from_modification_on_windowswrite_output)
TempDirectory)running_under_virtualenvvirtualenv_no_global)BinaryAllowedPredicatebuild should_build_for_install_command)format_controlreturnc s t td fdd}|S )N)reqr, c s t | jp
d} |}d|kS )N binary)r nameget_allowed_formats)r- canonical_nameallowed_formatsr+ /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/commands/install.pycheck_binary_allowed8 s
z6get_check_binary_allowed..check_binary_allowed)r bool)r+ r7 r5 r4 r6 get_check_binary_allowed7 s r9 c @ sz e Zd ZdZdZddddZeeee e
ddd Ze ee
dd
ddZee ee d
ddZee ddddZdS )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] [package-index-options] ...
%prog [options] -r [package-index-options] ...
%prog [options] [-e] ...
%prog [options] [-e] ...
%prog [options] ...N)r, c 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 ttj| j}| jd7| | jd7| j | j jd8d9d:d d;d d S ). By default this will not replace existing files/folders in . Use --upgrade to replace existing packages in with new versions.)r> metavarr? r@ z--user
use_user_sitezInstall 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-userstore_falsez--root root_pathz=Install everything relative to this alternate root directory.z--prefixprefix_pathzIInstallation prefix where lib, bin and other top-level folders are placedz-Uz --upgradeupgradezUpgrade all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.z--upgrade-strategyupgrade_strategyzonly-if-neededeageraG 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-reinstallforce_reinstallz;Reinstall all packages even if they are already up-to-date.z-Iz--ignore-installedignore_installedzIgnore 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 --compilecompileTz'Compile Python source files to bytecodez--no-compilez.Do not compile Python source files to bytecode)r= r> r@ z--no-warn-script-locationwarn_script_locationz0Do not warn when installing scripts outside PATHz--no-warn-conflictswarn_about_conflictsz%Do not warn about broken dependenciesr z--reportjson_report_filefilezGenerate 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.)cmd_opts
add_optionr
requirementsconstraintsno_depspreeditableadd_target_python_optionsr srcignore_requires_pythonno_build_isolation
use_pep517
no_use_pep517check_build_depsconfig_settingsinstall_optionsglobal_options no_binaryonly_binary
prefer_binaryrequire_hashesprogress_barroot_user_actionmake_option_groupindex_groupparserinsert_option_group)self
index_optsr5 r5 r6 add_optionsT s
zInstallCommand.add_options)optionsargsr, c , s |j r|jd k rtdt| d}|jr2|j}tj|dd |jpHg }t
dt t|j |j
|j|j|jd|_ d }d }|jrd|_tj|j|_tj|jrtj|jstdtdd }|j}| | |jpg }| |}t|} | j||| |jd
}
t|j|j}| t }t|j! ddd}
z,| "|||
|}|D ]}d|_#qLt$||j | j%|
||||
|j | j&d
}| j'||
|||j |j|j|j(||j)d
}| *|
|j+||j d}|j,r0t -d t.|j/}|j,dkrt0|1 d n2t2|j,ddd}t3j4|1 |ddd W 5 Q R X |j5rrt6dd |j/D }|rlt7dd8dd |D t9W S z|:d}W n t;k
r d}Y nX |j