hddlZddlZddlmZddlmZmZddlmZddl m Z m Z ddl m Z mZddlmZddlmZdd lmZeeZGd d eZdS) N)Values)AnyList)Command)ERRORSUCCESS) CommandErrorPipError) filesystem) getLogger) format_sizecjeZdZdZdZdZddZdedee 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 |/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/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"cXt|dkrtd|std|||d}d}|ddkr|||z }n|d|ddz }|st|d}|D]M}|t j|jz }t j |t d |Nt d t|t|dS) Nr+r:zPlease provide a patternrzNo matching packagesr=z for pattern ""z Removed %szFiles removed: %s (%s)) rHr rJrIr2warningr\statst_sizeunlinkverboser'r )rr#r$rXno_matching_msg bytes_removedrbs r r/zCacheCommand.remove_cache_itemss/ t99q==344 4 ;9:: :!!'47330 7c>> T**733 3EE :Q::: :O , NN? + + +  3 3H RWX..6 6M Ih    NN< 2 2 2 2 ,c%jj+m:T:TUUUUUr"cR|rtd||dgS)Nr:r=)r r/r;s r r0zCacheCommand.purge_caches1  5344 4&&w666r"subdircLtj|j|S)N)r\r]r4r1)rr#rps r rKzCacheCommand._cache_dirsw||G-v666r"c||d}||d}tj|dtj|dzS)Nr?r>r=rKr find_files)rr# old_http_dir new_http_dirs r rIzCacheCommand._find_http_filessVw77 w :: $\377*:O #; ;   r"rWcn||d}|d|vrdndz}tj||S)Nr@-z*.whlz-*.whlrs)rr#rW wheel_dirs r rJzCacheCommand._find_wheelss@OOGX66 $wWWHE$Y888r")rN)__name__ __module__ __qualname____doc__ignore_require_venvusager!rrstrintr8rr,r-r.rUrVr/r0rKrIrJr"r rrs    E : : : :6cs@'V'49''''' (f(DI($((((T + +d3i +D + + + + 0d3i 0D 0 0 0 02S 2d2222V&VS VdVVVV6767c7t7777 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 pip._internal.utils.miscr rzr2rrr"r rs 22222299999999;;;;;;;;******111111000000 8  T9T9T9T9T97T9T9T9T9T9r"