U n a,@sddlmZddlZddlZddlZddlmmmZddl m Z ddl m Z m Z ddlmZmZddlmZerddlmZddlmZmZeeZGd d d e ZdS) )absolute_importN)Command)ERRORSUCCESS) CommandErrorPipError)MYPY_CHECK_RUNNING)Values)AnyListc@sXeZdZdZdZdZddZddZdd Zd d Z d d Z ddZ ddZ ddZ dS) CacheCommanda 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 [] %prog remove %prog purge c Cs|j|j|j|j|jd}|js.tdtS|r>|d|kr\td d t |tS|d}z||||ddWn:t k r}zt|j dtWYSd}~XYnXtS)N)dirinfolistremovepurgezr$r$r%rs  zCacheCommand.remove_cache_itemscCs|r td||dgS)Nr'r))rrr(r$r$r%rszCacheCommand.purge_cachecCstj|jdS)Nwheels)r6r7rr)rr r$r$r%r.szCacheCommand._wheels_cache_dircCs*||}|d|krdnd}t||S)N-z*.whlz-*.whl)r.r/ find_files)rr r; wheel_dirr$r$r%r-s zCacheCommand._find_wheelsN)__name__ __module__ __qualname____doc__ignore_require_venvusager&rrrrrr.r-r$r$r$r%r s!r ) __future__rloggingr6r1pip._internal.utils.filesystem _internalutilsr/pip._internal.cli.base_commandrpip._internal.cli.status_codesrrpip._internal.exceptionsrrpip._internal.utils.typingroptparser typingr r getLoggerrFrr r$r$r$r%s