zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
U
H=®d6ã@sÂddlmZddlZddlZddlmZddlmZddlm    Z    m
Z
ddl m Z ddl mZddlmZmZmZdd    lmZdd
lmZer¤dd lmZdd lmZe e¡ZGd 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(eZdZdZdZdd„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] <requirement specifier> [package-index-options] ...
      %prog [options] -r <requirements file> [package-index-options] ...
      %prog [options] <vcs project url> ...
      %prog [options] <local project path> ...
      %prog [options] <archive url/path> ...c
CsL|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 ¡¡|jjddddddtjddt |j¡t tj|j¡}|j d    |¡|j d    |j¡dS)
Nz-dz--destz--destination-dirz--destination-directoryÚ download_dirÚdirzDownload packages into <dir>.)Ú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úVD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/commands/download.pyÚ add_options*s@û þzDownloadCommand.add_optionsc    Csü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ú cSsg|]}|jr|j‘qSr1)Úsuccessfully_downloadedÚname)Ú.0Úreqr1r1r2Ú
<listcomp>‰sþz'DownloadCommand.run.<locals>.<listcomp>zSuccessfully downloaded %s)Úignore_installedÚ    editablesrÚcheck_dist_restrictionr
rr    Úget_default_sessionrÚ_build_package_finderÚno_cleanrÚ enter_contextrr Úget_requirementsÚmake_requirement_preparerÚ make_resolverÚpython_versionÚtrace_basic_infoÚresolveÚjoinrÚvaluesr r)r/r4Úargsr5r6r=Ú build_deleter<Ú    directoryÚreqsr?ÚresolverÚrequirement_setÚ
downloadedr1r1r2ÚrunNs^
 
 
ý üù
ü
ÿ
ÿ
zDownloadCommand.runN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__Úusager3rr^r1r1r1r2rs
 $r)Ú
__future__rÚloggingr(Zpip._internal.clirZpip._internal.cli.cmdoptionsrÚpip._internal.cli.req_commandrrÚpip._internal.cli.status_codesrÚpip._internal.req.req_trackerrÚpip._internal.utils.miscr    r
r Úpip._internal.utils.temp_dirr Úpip._internal.utils.typingr ÚoptparserÚtypingrÚ    getLoggerr_Úloggerrr1r1r1r2Ú<module>s