
    q"h                         S SK r S SKrS SKJr  S SKJr  S SKJr  S SKJ	r	  S SK
JrJr  S SKJr  S SKJr  S S	KJr  S S
KJrJrJr  S SKJr  \ R2                  " \5      r " S S\5      rg)    N)Values)List)
cmdoptions)make_target_python)RequirementCommandwith_cleanup)SUCCESS)get_build_tracker)check_legacy_setup_py_options)
ensure_dirnormalize_pathwrite_output)TempDirectoryc                   L    \ rS rSrSrSrSS jr\S\S\	\
   S\4S	 j5       rS
rg)DownloadCommand   a,  
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> ...returnNc                 B   U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R
                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                  " 5       5        U R                   R                  [        R                   " 5       5        U R                   R                  [        R"                  " 5       5        U R                   R                  [        R$                  " 5       5        U R                   R                  SSSSSS[&        R(                  SS9  [        R*                  " U R                   5        [        R,                  " [        R.                  U R0                  5      nU R0                  R3                  S	U5        U R0                  R3                  S	U R                   5        g )
Nz-dz--destz--destination-dirz--destination-directorydownload_dirdirzDownload packages into <dir>.)destmetavardefaulthelpr   )cmd_opts
add_optionr   constraintsrequirementsno_depsglobal_options	no_binaryonly_binaryprefer_binarysrcprerequire_hashesprogress_barno_build_isolation
use_pep517no_use_pep517check_build_depsignore_requires_pythonoscurdiradd_target_python_optionsmake_option_groupindex_groupparserinsert_option_group)self
index_optss     Q/var/www/html/env/lib/python3.13/site-packages/pip/_internal/commands/download.pyadd_optionsDownloadCommand.add_options&   sC     !7!7!9:  !8!8!:;  !3!3!56  !:!:!<=  !5!5!78  !7!7!9:  !9!9!;<  !12  !12  !:!:!<=  !8!8!:;  !>!>!@A  !6!6!89  !9!9!;<  !<!<!>?  !B!B!DE  %II0 	! 		
 	,,T]];11""KK


 	'':6''4==9    optionsargsc                 .   SUl         / Ul        [        R                  " U5        [	        UR
                  5      Ul        [        UR
                  5        U R                  U5      n[        U5      nU R                  UUUUR                  S9nU R                  [        5       5      n[        UR                  (       + SSS9nU R                  X!XS5      n[!        X5        U R#                  UUUUUUR
                  SU R$                  S9n	U R'                  U	UUUR                  UR(                  UR*                  S9n
U R-                  U5        U
R/                  USS9n/ nUR0                  R3                  5        HM  nUR4                  b  M  UR6                  c   eU	R9                  U5        UR;                  UR6                  5        MO     U	R=                  UR0                  R3                  5       5        U(       a  [?        S	S
RA                  U5      5        [B        $ )NT)r:   sessiontarget_pythonr,   download)deletekindglobally_managedF)temp_build_dirr:   build_trackerr=   finderr   use_user_site	verbosity)preparerrE   r:   r,   r)   py_version_info)check_supported_wheelszSuccessfully downloaded %s )"ignore_installed	editablesr   check_dist_restrictionr   r   r   get_default_sessionr   _build_package_finderr,   enter_contextr
   r   no_cleanget_requirementsr   make_requirement_preparerrG   make_resolverr)   python_versiontrace_basic_inforesolver   valuessatisfied_bynamesave_linked_requirementappend prepare_linked_requirements_morer   joinr	   )r4   r:   r;   r=   r>   rE   rD   	directoryreqsrH   resolverrequirement_set
downloadedreqs                 r6   runDownloadCommand.runM   s   #'  ))'2-g.B.BC7''(**73*73++'#*#A#A	 , 
 **+<+>?!'''!
	 $$TFD%g411$' --nn 2 	
 %%#*#A#A))#22 & 
 	f%"**4*M "
"//668C'xx+++005!!#((+	 9 	11/2N2N2U2U2WX5sxx
7KLr9    )r   N)__name__
__module____qualname____firstlineno____doc__usager7   r   r   r   strintrf   __static_attributes__rh   r9   r6   r   r      sF    
0E%:N D6 Dc Ds D Dr9   r   )loggingr-   optparser   typingr   pip._internal.clir   pip._internal.cli.cmdoptionsr   pip._internal.cli.req_commandr   r   pip._internal.cli.status_codesr	   ,pip._internal.operations.build.build_trackerr
   pip._internal.req.req_installr   pip._internal.utils.miscr   r   r   pip._internal.utils.temp_dirr   	getLoggerri   loggerr   rh   r9   r6   <module>r      sK     	   ( ; J 2 J G M M 6			8	$@( @r9   