Your IP : 3.145.106.176


Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyc

�
�Rec@@s�ddlmZddlZddlZddlZddljjjZddl	m
Z
ddlmZm
Z
ddlmZmZddlmZer�ddlmZddlmZmZneje�Zd	e
fd
��YZdS(i(tabsolute_importN(tCommand(tERRORtSUCCESS(tCommandErrortPipError(tMYPY_CHECK_RUNNING(tValues(tAnytListtCacheCommandcB@sbeZdZeZdZd�Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
RS(
sw
    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.
    s|
        %prog dir
        %prog info
        %prog list [<pattern>]
        %prog remove <pattern>
        %prog purge
    cC@s�i|jd6|jd6|jd6|jd6|jd6}|jsRtjd�tS|si|d|kr�tjdd	j	t
|���tS|d}y||||d
�Wn(tk
r�}tj|jd�tSXt
S(Ntdirtinfotlisttremovetpurges<pip cache commands can not function since cache is disabled.isNeed an action (%s) to perform.s, i(t
get_cache_dirtget_cache_infotlist_cache_itemstremove_cache_itemstpurge_cachet	cache_dirtloggerterrorRtjointsortedRtargsR(tselftoptionsRthandlerstactionte((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pytrun-s*




	

cC@s)|rtd��ntj|j�dS(NsToo many arguments(RRRR(RRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyROscC@s�|rtd��nt|j|d��}|j|�}tj|�}tjd�jd|d|d|�j	�}t
j|�dS(NsToo many argumentst*sq
            Location: {location}
            Size: {size}
            Number of wheels: {package_count}
        tlocationt
package_counttsize(Rtlent_find_wheelst_wheels_cache_dirt
filesystemtformat_directory_sizettextwraptdedenttformattstripRR(RRRtnum_packagestcache_locationt
cache_sizetmessage((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyRVsc	C@s�t|�dkr!td��n|r4|d}nd}|j||�}|sctjd�dSg}xH|D]@}tjj|�}tj	|�}|j
dj||��qpWtjd�tjdjt
|���dS(	NisToo many argumentsiR!sNothing cached.s
 - {} ({})sCache contents:
s
(R%RR&RRtostpathtbasenameR(tformat_file_sizetappendR,RR(	RRRtpatterntfilestresultstfilenametwheelR$((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyRls 



cC@s�t|�dkr!td��n|s6td��n|j||d�}|satd��nx+|D]#}tj|�tjd|�qhWtjdt|��dS(NisToo many argumentssPlease provide a patternisNo matching packagess
Removed %ssFiles removed: %s(R%RR&R2tunlinkRtdebugR(RRRR8R:((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyR�s

cC@s(|rtd��n|j|dg�S(NsToo many argumentsR!(RR(RRR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyR�scC@stjj|jd�S(Ntwheels(R2R3RR(RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyR'�scC@s;|j|�}|d|kr$dnd}tj||�S(Nt-s*.whls-*.whl(R'R(t
find_files(RRR7t	wheel_dir((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyR&�s(t__name__t
__module__t__doc__tTruetignore_require_venvtusageR RRRRRR'R&(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyR
s
	"						(t
__future__RtloggingR2R*tpip._internal.utils.filesystemt	_internaltutilsR(tpip._internal.cli.base_commandRtpip._internal.cli.status_codesRRtpip._internal.exceptionsRRtpip._internal.utils.typingRtoptparseRttypingRR	t	getLoggerRBRR
(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/commands/cache.pyt<module>s

?>