Re(ddlZddlZddlmZddlmZddlmZddlm Z ddl m Z m Z ddl mZddlmZdd lmZmZmZdd lmZejeZGd d e ZdS) N)Values)List) cmdoptions)make_target_python)RequirementCommand with_cleanup)SUCCESS)get_requirement_tracker) ensure_dirnormalize_path write_output) TempDirectorycNeZdZdZdZd dZededee de fdZ dS) 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|jtj|jtj|jtj|jtj|jtj|jtj|jtj |jtj |jtj |jtj |jtj |jtj|jtj|jtj|jtj|jddddddt$jdtj|jtjtj|j}|jd ||jd |jdS) Nz-dz--destz--destination-dirz--destination-directory download_dirdirzDownload packages into .)destmetavardefaulthelpr)cmd_opts add_optionr constraints requirementsno_depsglobal_options no_binary only_binary prefer_binarysrcprerequire_hashes progress_barno_build_isolation use_pep517 no_use_pep517ignore_requires_pythonoscurdiradd_target_python_optionsmake_option_group index_groupparserinsert_option_group)self index_optss /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/commands/download.py add_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=99999optionsargsc d|_g|_tj|t |j|_t |j||}t|}| ||||j }| t}t|j dd}|||||}|||||||jd} || |||j |j} ||| |d} g} | jD]A} | j8| jJ| | | | jB| r#t7d d | t:S) NT)r6session target_pythonr)download)deletekindglobally_managedF)temp_build_dirr6 req_trackerr9finderr use_user_site)preparerrAr6r)py_version_info)check_supported_wheelszSuccessfully downloaded %s )ignore_installed editablesrcheck_dist_restrictionr rr get_default_sessionr_build_package_finderr) enter_contextr rno_cleanget_requirementsmake_requirement_preparer make_resolverpython_versiontrace_basic_inforesolvervalues satisfied_bynamesave_linked_requirementappendr joinr )r1r6r7r9r:rAr@ directoryreqsrCresolverrequirement_set downloadedreqs r3runzDownloadCommand.runKs$( )'222-g.BCC7'(((**733*733 ++'#*#A ,  (()@)B)BCC !''!   $$T7FGDD11$# -2  %%#*#A#2 &   f%%%"**4*MM " "/6688 , ,C'x+++00555!!#(+++  M 5sxx 7K7K L L Lr5)rN) __name__ __module__ __qualname____doc__usager4rrrstrintr`r5r3rrss   0E$:$:$:$:L?6?c?s???\???r5r)loggingr*optparsertypingrpip._internal.clirpip._internal.cli.cmdoptionsrpip._internal.cli.req_commandrrpip._internal.cli.status_codesr pip._internal.req.req_trackerr pip._internal.utils.miscr r r pip._internal.utils.temp_dirr getLoggerraloggerrrhr5r3rus ((((((;;;;;;JJJJJJJJ222222AAAAAAMMMMMMMMMM666666  8 $ $zzzzz(zzzzzr5