Re6@s ddlmZddlZddlZddlmZddlmZddlm Z m Z ddl m Z ddl mZddlmZmZmZdd lmZdd lmZerdd lmZdd lmZejeZGd dde ZdS))absolute_importN) cmdoptions)make_target_python)RequirementCommand with_cleanup)SUCCESS)get_requirement_tracker) ensure_dirnormalize_path write_output) TempDirectory)MYPY_CHECK_RUNNING)Values)Listc@s:eZdZdZdZddZeddZdS)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 Cs|jjtj|jjtj|jjtj|jjtj|jjtj|jjtj|jjtj |jjtj |jjtj |jjtj |jjtj |jjtj|jjtj|jjtj|jjtj|jjddddddddd tjd d tj|jtjtj|j}|jjd ||jjd |jdS) Nz-dz--destz--destination-dirz--destination-directorydest download_dirmetavardirdefaulthelpzDownload packages into .r)cmd_opts add_optionr constraints requirements build_dirno_depsglobal_options no_binary only_binary prefer_binarysrcprerequire_hashes progress_barno_build_isolation use_pep517 no_use_pep517oscurdiradd_target_python_optionsmake_option_group index_groupparserinsert_option_group)self index_optsr1/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/download.py add_options*s6   zDownloadCommand.add_optionscCsd|_g|_tj|t|j|_t|j|j|}t|}|j d|d|d|}|j p|j }|j t }t|j d|dddd}|j||||} |jd |d|d |d|d |d |jd d} |jd| d |d|d|j} |j|| j| dd} djdd| jjD} | rtd| tS)NToptionssession target_pythondeletekinddownloadglobally_managedtemp_build_dir req_trackerfinderr use_user_siteFpreparerpy_version_infocheck_supported_wheels cSs"g|]}|jr|jqSr1)successfully_downloadedname).0reqr1r1r2 s z'DownloadCommand.run..zSuccessfully downloaded %s)ignore_installed editablesrcheck_dist_restrictionr rr get_default_sessionr_build_package_finderno_cleanr enter_contextrr get_requirementsmake_requirement_preparer make_resolverpython_versiontrace_basic_inforesolvejoinrvaluesr r)r/r4argsr5r6r= build_deleter< directoryreqsr?resolverrequirement_set downloadedr1r1r2runNsP                zDownloadCommand.runN)__name__ __module__ __qualname____doc__usager3rr^r1r1r1r2rs  $r) __future__rloggingr(Zpip._internal.clirZpip._internal.cli.cmdoptionsrpip._internal.cli.req_commandrrpip._internal.cli.status_codesrpip._internal.req.req_trackerrpip._internal.utils.miscr r r pip._internal.utils.temp_dirr pip._internal.utils.typingr optparsertypingr getLoggerr_loggerrr1r1r1r2s