1jddlZddlZddlmZddlmZmZddlmZddl m Z m Z ddl m Z mZddlmZddlmZeeZGd d eZdS) N)Values)AnyList)Command)ERRORSUCCESS) CommandErrorPipError) filesystem) getLoggercjeZdZdZdZdZddZdedee de fd Z dedee ddfd Z dedee ddfd Zdedee ddfd Zd ee ddfdZd ee ddfdZdedee ddfdZdedee ddfdZdede de fdZdedee fdZdede dee fdZdS) CacheCommandaw 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. ```` can be a glob expression or a package name. Tz %prog dir %prog info %prog list [] [--format=[human, abspath]] %prog remove %prog purge returnNc|jdddddd|jd|jdS) Nz--formatstore list_formathuman)rabspathz:Select the output format among: human (default) or abspath)actiondestdefaultchoiceshelpr)cmd_opts add_optionparserinsert_option_group)selfs n/builddir/build/BUILD/cloudlinux-venv-1.0.11/venv/lib/python3.11/site-packages/pip/_internal/commands/cache.py add_optionszCacheCommand.add_options'sU   (M !    ''4=99999optionsargsc |j|j|j|j|jd}|js!t dtS|r |d|vrBt dd t|tS|d} ||||ddnC#t$r6}t |j dtcYd}~Sd}~wwxYwtS)N)dirinfolistremovepurgez  2 KK &--00 1 1 1 1 1 2 2r!ct|dkrtd|std|||d}d}|ddkr|||z }n|d|ddz }|st||D]1}t j|td |2t d t|dS) Nr*r9zPlease provide a patternrzNo matching packagesr<z for pattern ""z Removed %szFiles removed: %s) rGr rIrHr1warningr\unlinkverboser&)rr"r#rXno_matching_msgrbs rr.zCacheCommand.remove_cache_itemss  t99q==344 4 ;9:: :!!'47330 7c>> T**733 3EE :Q::: :O , NN? + + + 3 3H Ih    NN< 2 2 2 2 'U44444r!cR|rtd||dgS)Nr9r<)r r.r:s rr/zCacheCommand.purge_caches1  5344 4&&w666r!subdircLtj|j|S)N)r\r]r3r0)rr"rms rrJzCacheCommand._cache_dirsw||G-v666r!c||d}||d}tj|dtj|dzS)Nr>r=r<rJr find_files)rr" old_http_dir new_http_dirs rrHzCacheCommand._find_http_filessVw77 w :: $\377*:O #; ;   r!rWcn||d}|d|vrdndz}tj||S)Nr?-z*.whlz-*.whlrp)rr"rW wheel_dirs rrIzCacheCommand._find_wheelss@OOGX66 $wWWHE$Y888r!)rN)__name__ __module__ __qualname____doc__ignore_require_venvusager rrstrintr7rr+r,r-rUrVr.r/rJrHrIr!rrrs   E : : : :6cs@'V'49''''' (f(DI($((((T + +d3i +D + + + + 0d3i 0D 0 0 0 02S 2d22225&5S 5d55552767c7t7777 7&7#7#7777  49    9F9S9T#Y999999r!r)r\rNoptparsertypingrrpip._internal.cli.base_commandrpip._internal.cli.status_codesrrpip._internal.exceptionsr r pip._internal.utilsr pip._internal.utils.loggingr rwr1rrr!rrs 22222299999999;;;;;;;;******111111 8  R9R9R9R9R97R9R9R9R9R9r!