3
Re6 @ s d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z m
Z
d dlmZ d dl
mZ d dlmZmZmZ d d lmZ d d
lmZ erd dlmZ d dlmZ ejeZG d
d de ZdS ) )absolute_importN)
cmdoptions)make_target_python)RequirementCommandwith_cleanup)SUCCESS)get_requirement_tracker)
ensure_dirnormalize_pathwrite_output)
TempDirectory)MYPY_CHECK_RUNNING)Values)Listc @ s( e Zd ZdZdZdd Zedd 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] ...c
C sL | j jtj | j jtj | j jtj | j jtj | j jtj | j jtj | j jtj | j jtj
| j jtj | j jtj | j jtj
| j jtj | j jtj | j jtj | j jtj | j jddddddtjdd tj| j tjtj| j}| jjd | | jjd | j d S )
Nz-dz--destz--destination-dirz--destination-directorydownload_dirdirzDownload packages into .)destmetavardefaulthelpr )cmd_opts
add_optionr constraintsrequirements build_dirno_depsglobal_options no_binaryonly_binary
prefer_binarysrcprerequire_hashesprogress_barno_build_isolation
use_pep517
no_use_pep517oscurdiradd_target_python_optionsmake_option_groupindex_groupparserinsert_option_group)self
index_opts r1 /builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_internal/commands/download.pyadd_options* s6 zDownloadCommand.add_optionsc C s d|_ g |_tj| t|j|_t|j | j|}t|}| j |||d}|j
pX|j }| jt
}t|j|ddd}| j||||} | j||||||jdd}
| j|
|||jd}| j| |j| dd}d jd
d |jj D }
|
rtd|
tS )
NT)optionssession
target_pythondownload)deletekindglobally_managedF)temp_build_dirr4 req_trackerr5 finderr
use_user_site)preparerr= r4 py_version_info)check_supported_wheels c S s g | ]}|j r|jqS r1 )successfully_downloadedname).0reqr1 r1 r2