Ë
    ÊmxiÓ  ã                   óº   — d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
 d dlmZ d dlmZ d dlmZmZmZ d d	lmZ  e j*                  e«      Z G d
„ de	«      Zy)é    N)ÚValues)Ú
cmdoptions)Úmake_target_python)ÚRequirementCommandÚwith_cleanup)ÚSUCCESS)Úget_build_tracker)Ú
ensure_dirÚnormalize_pathÚwrite_output)ÚTempDirectoryc                   ó@   — e Zd ZdZdZd	d„Zededee	   de
fd„«       Zy)
Ú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> ...ÚreturnNc           
      óÊ  — | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j
                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                  «       «       | j                   j                  t        j                   «       «       | j                   j                  t        j"                  «       «       | j                   j                  ddddddt$        j&                  d¬«       t        j(                  | j                   «       t        j*                  t        j,                  | j.                  «      }| j.                  j1                  d	|«       | j.                  j1                  d	| j                   «       y )
Nz-dz--destz--destination-dirz--destination-directoryÚdownload_dirÚdirzDownload packages into <dir>.)ÚdestÚmetavarÚdefaultÚhelpr   )Úcmd_optsÚ
add_optionr   ÚconstraintsÚbuild_constraintsÚrequirementsÚno_depsÚ	no_binaryÚonly_binaryÚprefer_binaryÚsrcÚpreÚrequire_hashesÚprogress_barÚno_build_isolationÚ
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     úV/home/htdocs/ttos/venv/lib/python3.12/site-packages/pip/_internal/commands/download.pyÚadd_optionszDownloadCommand.add_options$   s(  € Ø�‰× Ñ ¤×!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Ø�‰× Ñ ¤×!<Ñ!<Ó!>Ô?Ø�‰× Ñ ¤×!BÑ!BÓ!DÔEà�‰× Ñ ØØØØ%ØØÜ—I‘IØ0ð 	!ô 		
ô 	×,Ñ,¨T¯]©]Ô;ä×1Ñ1Ü×"Ñ"Ø�K‰Kó
ˆ
ð
 	�‰×'Ñ'¨¨:Ô6Ø�‰×'Ñ'¨¨4¯=©=Õ9ó    ÚoptionsÚargsc           
      ó0  — d|_         g |_        t        j                  |«       t        j                  |«       t        |j                  «      |_        t        |j                  «       | j                  |«      }t        |«      }| j                  ||||j                  ¬«      }| j                  t        «       «      }t        |j                   dd¬«      }| j!                  ||||«      }| j#                  ||||||j                  d| j$                  ¬«      }	| j'                  |	|||j                  |j(                  ¬«      }
| j+                  |«       |
j-                  |d¬«      }|	j/                  |j0                  j3                  «       «       g }|j0                  j3                  «       D ]I  }|j4                  �Œ|j6                  €J ‚|	j9                  |«       |j;                  |j6                  «       ŒK |rt=        d	d
j?                  |«      «       t@        S )NT)r5   ÚsessionÚtarget_pythonr(   Údownload)ÚdeleteÚkindÚglobally_managedF)Útemp_build_dirr5   Úbuild_trackerr8   Úfinderr   Úuse_user_siteÚ	verbosity)Úpreparerr@   r5   r(   Úpy_version_info)Úcheck_supported_wheelszSuccessfully downloaded %sú )!Úignore_installedÚ	editablesr   Úcheck_dist_restrictionÚcheck_build_constraintsr   r   r
   Úget_default_sessionr   Ú_build_package_finderr(   Úenter_contextr	   r   Úno_cleanÚget_requirementsÚmake_requirement_preparerrB   Úmake_resolverÚpython_versionÚtrace_basic_infoÚresolveÚ prepare_linked_requirements_morer   ÚvaluesÚsatisfied_byÚnameÚsave_linked_requirementÚappendr   Újoinr   )r0   r5   r6   r8   r9   r@   r?   Ú	directoryÚreqsrC   ÚresolverÚrequirement_setÚ
downloadedÚreqs                 r2   ÚrunzDownloadCommand.runJ   s  € à#'ˆÔ ð ˆÔä×)Ñ)¨'Ô2Ü×*Ñ*¨7Ô3ä-¨g×.BÑ.BÓCˆÔÜ�7×'Ñ'Ô(à×*Ñ*¨7Ó3ˆä*¨7Ó3ˆØ×+Ñ+ØØØ'Ø#*×#AÑ#Að	 ,ó 
ˆð ×*Ñ*Ô+<Ó+>Ó?ˆä!Ø×'Ñ'Ð'ØØ!ô
ˆ	ð ×$Ñ$ T¨7°F¸GÓDˆà×1Ñ1Ø$ØØ'ØØØ ×-Ñ-ØØ—n‘nð 2ó 	
ˆð ×%Ñ%ØØØØ#*×#AÑ#AØ#×2Ñ2ð &ó 
ˆð 	×Ñ˜fÔ%à"×*Ñ*¨4ÈÐ*ÓMˆà×1Ñ1°/×2NÑ2N×2UÑ2UÓ2WÔXà "ˆ
Ø"×/Ñ/×6Ñ6Ó8ò 	,ˆCØ×ÑÑ'Ø—x‘xÐ+Ð+Ð+Ø×0Ñ0°Ô5Ø×!Ñ! #§(¡(Õ+ð		,ñ ÜÐ5°s·x±xÀ
Ó7KÔLäˆr4   )r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úusager3   r   r   ÚlistÚstrÚintrb   © r4   r2   r   r      sF   „ ñ
ð0€Eó$:ðL ðC˜6ð C¨¨c©ð C°sò Có ñCr4   r   )Úloggingr)   Úoptparser   Ú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.utils.miscr
   r   r   Úpip._internal.utils.temp_dirr   Ú	getLoggerrc   Úloggerr   rk   r4   r2   ú<module>rw      sG   ðÛ Û 	Ý å (Ý ;ß JÝ 2Ý Jß MÑ MÝ 6à	ˆ×	Ñ	˜8Ó	$€ô~Ð(õ ~r4   