B
š•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 er¤d dlmZ d dlmZ e e¡ZG d
d„ de ƒZdS )é )Úabsolute_importN)Ú
cmdoptions)Úmake_target_python)ÚRequirementCommandÚwith_cleanup)ÚSUCCESS)Úget_requirement_tracker)Ú
ensure_dirÚnormalize_pathÚwrite_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 t ¡ ¡ | j t ¡ ¡ | j t ¡ ¡ | j t ¡ ¡ | j t ¡ ¡ | j t ¡ ¡ | j t ¡ ¡ | j t
¡ ¡ | j t ¡ ¡ | j t ¡ ¡ | j t
¡ ¡ | j t ¡ ¡ | j t ¡ ¡ | j t ¡ ¡ | j t ¡ ¡ | j jddddddtjdd t | j ¡ t tj| j¡}| j d |¡ | j d | j ¡ d S )
Nz-dz--destz--destination-dirz--destination-directoryÚdownload_dirÚdirzDownload packages into .)ÚdestÚmetavarÚdefaultÚhelpr )Úcmd_optsÚ
add_optionr ÚconstraintsÚrequirementsÚ build_dirÚno_depsÚglobal_optionsÚ no_binaryÚonly_binaryÚ
prefer_binaryÚsrcÚpreÚrequire_hashesÚprogress_barÚno_build_isolationÚ
use_pep517Ú
no_use_pep517ÚosÚcurdirÚadd_target_python_optionsÚmake_option_groupÚindex_groupÚparserÚinsert_option_group)ÚselfÚ
index_opts© r1 úŽ/builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_internal/commands/download.pyÚadd_options* s6 zDownloadCommand.add_optionsc C sü d|_ g |_t |¡ t|jƒ|_t|jƒ | |¡}t|ƒ}| j |||d}|j
pX|j }| t
ƒ ¡}t|j|ddd}| ||||¡} | j||||||jdd}
| j|
|||jd}| |¡ |j| dd}d d
d„ |j ¡ D ƒ¡}
|
røtd|
ƒ tS )
NT)ÚoptionsÚsessionÚ
target_pythonÚdownload)ÚdeleteÚkindÚglobally_managedF)Útemp_build_dirr4 Úreq_trackerr5 Úfinderr Ú
use_user_site)Úpreparerr= r4 Úpy_version_info)Úcheck_supported_wheelsú c S s g | ]}|j r|j‘qS r1 )Úsuccessfully_downloadedÚname)Ú.0Úreqr1 r1 r2 ú
‰ s z'DownloadCommand.run..zSuccessfully downloaded %s)Úignore_installedÚ editablesr Úcheck_dist_restrictionr
r r Úget_default_sessionr Ú_build_package_finderÚno_cleanr Ú
enter_contextr r Úget_requirementsÚmake_requirement_preparerÚ
make_resolverÚpython_versionÚtrace_basic_infoÚresolveÚjoinr Úvaluesr r )r/ r4 Úargsr5 r6 r= Úbuild_deleter<