File: D:/Python311/Lib/site-packages/pip/_internal/commands/__pycache__/cache.cpython-311.pyc
�
�mi& � � � d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm Z m
Z
d dlmZm
Z
d dlmZ d dlmZ d d lmZ ee� � Z G d
� de� � ZdS )� N)�Values)�Callable)�Command)�ERROR�SUCCESS)�CommandError�PipError)�
filesystem)� getLogger)�format_sizec � � e Zd ZdZdZdZdd�Zdeee e
ee gdf f fd�Zde
d ee de
fd
�Zde
d ee ddfd�Zde
d ee ddfd�Zde
d ee ddfd
�Zdee ddfd�Zdee ddfd�Zde
d ee ddfd�Zde
d ee ddfd�Zde
dedefd�Zde
dee fd�Zde
dedee fd�ZdS )�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.
``<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
�returnNc � � | j � dddddd�� � | j � d| j � � d S ) Nz--format�store�list_format�human)r �abspathz:Select the output format among: human (default) or abspath)�action�dest�default�choices�helpr )�cmd_opts�
add_option�parser�insert_option_group��selfs �>D:\Python311\Lib\site-packages\pip/_internal/commands/cache.py�add_optionszCacheCommand.add_options( sU � ��
� � �����(�M�
!�
�
�
�
��'�'��4�=�9�9�9�9�9� c �D � | j | j | j | j | j d�S )N)�dir�info�list�remove�purge)�
get_cache_dir�get_cache_info�list_cache_items�remove_cache_items�purge_cacher s r �handler_mapzCacheCommand.handler_map4 s/ � ��%��'��)��-��%�
�
�
r"