+
     h  c                   s    ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIHt ^ RI	H
t
Ht ^ RIHtHt ^ RIHt ^ RIHt ^ R	IHt ]! ]4      t ! R
 R]4      tR# )i    N)Values)AnyList)Command)ERRORSUCCESS)CommandErrorPipError)
filesystem)	getLogger)format_sizec                   s  a  ] tR t^t o RtRtRtV 3R lR ltV 3R lR ltV 3R lR	 lt	V 3R
 lR lt
V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )CacheCommandaS  
Inspect and manage pip's wheel cache.

Subcommands:

- dir: Show the cache directory.
- info: Show information about the cache.
- list: List filenames of packages stored in the cache.
- remove: Remove one or more package from the cache.
- purge: Remove all items from the cache.

``<pattern>`` can be a glob expression or a package name.
Tz
        %prog dir
        %prog info
        %prog list [<pattern>] [--format=[human, abspath]]
        %prog remove <pattern>
        %prog purge
    c                s   < V ^8  d   QhRR/# )   returnN format__classdict__   "A/usr/lib/python3.14/site-packages/pip/_internal/commands/cache.py__annotate__CacheCommand.__annotate__(   s     
: 
:T 
:    c           	     s    V P                   P                  R RRRRRR7       V P                  P                  ^ V P                   4       R# )z--formatZstorelist_formathumanz:Select the output format among: human (default) or abspath)actionZdestZdefaultZchoicesZhelpN)r   Zabspath)Zcmd_optsZ
add_optionZparserZinsert_option_group)selfs   &r   add_optionsZCacheCommand.add_options(   sE      (M 	! 	
 	''4==9r   c                s<   < V ^8  d   QhRS[ RS[S[,          RS[/# )r   optionsargsr   )r    r   strZintr   r   r   r   r   4   s&      6 c s r   c           
     s>   R V P                   RV P                  RV P                  RV P                  RV P                  /pVP
                  '       g   \        P                  R4       \        # V'       d   V^ ,          V9  d5   \        P                  RRP                  \        V4      4      4       \        # V^ ,          p W4,          ! WR,          4       \        #   \         d7   p\        P                  TP                  ^ ,          4       \        u R	p?# R	p?ii ; i)
ZdirinfoZlistZremoveZpurgez<pip cache commands can not function since cache is disabled.zNeed an action (%s) to perform.z, :   NNN)get_cache_dirget_cache_infolist_cache_itemsremove_cache_itemspurge_cache	cache_dirloggerZerrorr   joinsortedr   r   r   )r   r   r   Zhandlersr   Zes   &&&   r   runZCacheCommand.run4   s    4%%D''D))d--T%%
    LLWXL tAwh.LL1		&*+ La	W2h/
 	  	LL#L	s    C D&+DDDc                :   < V ^8  d   QhRS[ RS[S[,          RR/# r   r   r   r   Nr    r   r   r   r   r   r   r   T   s&     ' 'V '49 ' 'r   c                sj    V'       d   \        R 4      h\        P                  VP                  4       R# )Too many argumentsN)r   r'   r   r&   r   r   r      &&&r   r!   ZCacheCommand.get_cache_dirT   s#    344G%%&r   c                r+   r,   r-   r   r   r   r   r   Z   s&     ( (f (DI ($ (r   c           
     sV   V'       d   \        R 4      h\        V P                  V4      4      p\        V P                  VR4      4      pV P	                  VR4      pV P	                  VR4      pV P	                  VR4      p\
        P                  ! \
        P                  ! V4      \
        P                  ! V4      ,           4      p\
        P                  ! V4      p	\        P                  ! R4      P                  VVVVVVV	R7      P                  4       p
\        P                  V
4       R# )r.   *http-v2httpwheelsa  
                    Package index page cache location (pip v23.3+): {http_cache_location}
                    Package index page cache location (older pips): {old_http_cache_location}
                    Package index page cache size: {http_cache_size}
                    Number of HTTP files: {num_http_files}
                    Locally built wheels location: {wheels_cache_location}
                    Locally built wheels size: {wheels_cache_size}
                    Number of locally built wheels: {package_count}
                )http_cache_locationold_http_cache_locationhttp_cache_sizenum_http_fileswheels_cache_locationZpackage_countwheels_cache_sizeN)r   len_find_http_files_find_wheels
_cache_dirr   r
   Zdirectory_sizeZformat_directory_sizetextwrapZdedentr   Zstripr'   r   )r   r   r   r8   Znum_packagesr5   r6   r9   r7   r:   Zmessages   &&&        r   r"   ZCacheCommand.get_cache_infoZ   s   344T227;<4,,Wc:;"oogyA"&//'6"B $ B$00%%&9:''(?@A
 '<<=RS OO
 V$7(? /-&;*"3   UW+ 	0 	Gr   c                r+   r,   r-   r   r   r   r   r      s&     + + +d3i +D +r   c                s    \        V4      ^8  d   \        R4      hV'       d   V^ ,          pMRpV P                  W4      pVP                  R8X  d   V P	                  V4       R# V P                  V4       R# )r    r.   r1   r   N)r;   r   r=   r   format_for_humanformat_for_abspath)r   r   r   patternfiless   &&&  r   r#   ZCacheCommand.list_cache_items   sd    t9q=3441gGG!!'3')!!%(##E*r   c                4   < V ^8  d   QhRS[ S[,          RR/# r   rC   r   Nr   r   r   r   r   r   r      s     0 0d3i 0D 0r   c                sx   V'       g   \         P                  R 4       R# . pV FP  p\        P                  P	                  V4      p\
        P                  ! V4      pVP                  RV RV R24       KR  	  \         P                  R4       \         P                  RP                  \        V4      4      4       R# )zNo locally built wheels cached.Nz - z (Z)zCache contents:

)
r'   r   ospathZbasenamer   Zformat_file_sizeZappendr(   r)   )r   rC   ZresultsfilenameZwheelZsizes   &&    r   r@   ZCacheCommand.format_for_human   s    KK9:HGG$$X.E..x8DNNSr$q12  	'(DIIfWo./r   c                rD   rE   rF   r   r   r   r   r      s     2 2S	 2d 2r   c                st    V'       d0   \         P                  R P                  \        V4      4      4       R# R# )rG   N)r'   r   r(   r)   )r   rC   s   &&r   rA   ZCacheCommand.format_for_abspath   s#    KK		&-01 r   c                r+   r,   r-   r   r   r   r   r      s+     V V& VS	 Vd Vr   c                sR   \        V4      ^8  d   \        R4      hV'       g   \        R4      hV P                  W^ ,          4      pRpV^ ,          R8X  d   W0P                  V4      ,          pMVRV^ ,           R2,          pV'       g   \        P                  V4       ^ pV FV  pV\        P                  ! V4      P                  ,          p\        P                  ! V4       \        P                  RV4       KX  	  \        P                  R\        V4      \        V4      4       R	# )
r    r.   zPlease provide a patternzNo matching packagesr1   z for pattern "Z"z
Removed %szFiles removed: %s (%s)N)r;   r   r=   r<   r'   ZwarningrH   ZstatZst_sizeZunlinkZverboser   r
   )r   r   r   rC   Zno_matching_msgZbytes_removedrJ   s   &&&    r   r$   ZCacheCommand.remove_cache_items   s    t9q=3449::!!'7307c>**733E Qy::ONN?+HRWWX.666MIIhNN<2  	,c%j+m:TUr   c                r+   r,   r-   r   r   r   r   r      s&     7 76 7c 7t 7r   c                sN    V'       d   \        R 4      hV P                  VR.4      # )r.   r1   )r   r$   r/   r0   r   r%   ZCacheCommand.purge_cache   s&    344&&w66r   c                s,   < V ^8  d   QhRS[ RS[RS[/# )r   r   subdirr   )r    r   r   r   r   r   r      s"     7 7& 7# 7# 7r   c                sV    \         P                  P                  VP                  V4      # )N)rH   rI   r(   r&   )r   r   rK   r0   r   r>   ZCacheCommand._cache_dir   s    ww||G--v66r   c                s6   < V ^8  d   QhRS[ RS[S[,          /# )r   r   r   )r    r   r   r   r   r   r   r      s     
 
 
49 
r   c                s    V P                  VR 4      pV P                  VR4      p\        P                  ! VR4      \        P                  ! VR4      ,           # )r3   r2   r1   r>   r   Z
find_files)r   r   Zold_http_dirZnew_http_dirs   &&  r   r<   ZCacheCommand._find_http_files   sN    w7w	:$$\37*:O:O#;
 
 	
r   c                s<   < V ^8  d   QhRS[ RS[RS[S[,          /# )r   r   rB   r   )r    r   r   r   r   r   r   r      s&     9 9F 9S 9T#Y 9r   c                sv    V P                  VR 4      pTRV9   d   RMR,           p\        P                  ! W24      # )r4   Z-z*.whlz-*.whlrL   )r   r   rB   Z	wheel_dirs   &&& r   r=   ZCacheCommand._find_wheels   s7    OOGX6	$ wWHE$$Y88r   r   N)__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__Zignore_require_venvZusager   r*   r!   r"   r#   r@   rA   r$   r%   r>   r<   r=   Z__static_attributes__Z__classdictcell__)r   s   @r   r   r      s      E
: 
: @' '( (T+ +0 02 2V V67 77 7
 
9 9r   r   )rH   r?   Zoptparser    Ztypingr   r   Zpip._internal.cli.base_commandr   Zpip._internal.cli.status_codesr   r   Zpip._internal.exceptionsr   r   Zpip._internal.utilsr   Zpip._internal.utils.loggingr	   Zpip._internal.utils.miscr
   rM   r'   r   r   r   r   <module>rN      s;    	    2 9 ; * 1 0	8	T97 T9r   