|as˥ d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm Z d dl
mZmZ d dl
mZ d dlmZ d d lmZmZmZ d d
lmZ e j e Z G d de ZdS )
N)Values)List)
cmdoptions)make_target_python)RequirementCommandwith_cleanup)SUCCESS)get_requirement_tracker)
ensure_dirnormalize_pathwrite_output)
TempDirectoryc N e Zd ZdZdZd dZededee de
fd ZdS )
DownloadCommandaL
Download packages from:
- PyPI (and other indexes) using requirement specifiers.
- VCS project urls.
- Local project directories.
- Local or remote source archives.
pip also supports downloading from "requirements files", which provide
an easy way to specify a whole environment to be downloaded.
a
%prog [options] [package-index-options] ...
%prog [options] -r [package-index-options] ...
%prog [options] ...
%prog [options] ...
%prog [options] ...returnNc
X | j t j | j t j | j t j | j t j | j t j | j t j | j t j | j t j
| j t j | j t j | j t j
| j t j | j t j | j t j | j t j | j ddddddt$ j d t j | j t j t j | j }| j d | | j d | j d S )
Nz-dz--destz--destination-dirz--destination-directorydownload_dirdirzDownload packages into .)destmetavardefaulthelpr )cmd_opts
add_optionr constraintsrequirementsno_depsglobal_options no_binaryonly_binary
prefer_binarysrcprerequire_hashesprogress_barno_build_isolation
use_pep517
no_use_pep517ignore_requires_pythonoscurdiradd_target_python_optionsmake_option_groupindex_groupparserinsert_option_group)self
index_optss /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el9.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/commands/download.pyadd_optionszDownloadCommand.add_options% sv
!7!9!9:::
!8!:!:;;;
!3!5!5666
!:!!@!@AAA
!6!8!8999
!9!;!;<<<
!B!D!DEEE
%I0 !
,T];;;1"K
'':666''4=99999 optionsargsc d|_ g |_ t j | t |j |_ t
|j | | }t | }| ||||j
}| t }t |j dd }| |||| }| ||||||j d } | | |||j
|j }
| | |
|d }g }|j D ]A}
|
j 8|
j J | |
| |
j B|r#t7 d d
| t: S )NT)r6 session
target_pythonr) download)deletekindglobally_managedF)temp_build_dirr6 req_trackerr9 finderr
use_user_site)preparerrA r6 r) py_version_info)check_supported_wheelszSuccessfully downloaded %s )ignore_installed editablesr check_dist_restrictionr r r get_default_sessionr _build_package_finderr)
enter_contextr
r no_cleanget_requirementsmake_requirement_preparer
make_resolverpython_versiontrace_basic_inforesolver valuessatisfied_bynamesave_linked_requirementappendr
joinr )r1 r6 r7 r9 r: rA r@ directoryreqsrC resolverrequirement_set
downloadedreqs r3 runzDownloadCommand.runK s $( )'222-g.BCC7'(((**733*733
++'#*#A ,
(()@)B)BCC!''!
$$T7FGDD11$# - 2
%%#*#A#2 &