Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/cache.pyc

ó
“tÆ_c@@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((sM/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/cache.pytrun-s*




	

cC@s)|rtdƒ‚ntj|jƒdS(NsToo many arguments(RRRR(RRR((sM/opt/alt/python35/lib/python3.5/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((sM/opt/alt/python35/lib/python3.5/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$((sM/opt/alt/python35/lib/python3.5/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:((sM/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/cache.pyR„s

cC@s(|rtdƒ‚n|j|dgƒS(NsToo many argumentsR!(RR(RRR((sM/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/cache.pyR•scC@stjj|jdƒS(Ntwheels(R2R3RR(RR((sM/opt/alt/python35/lib/python3.5/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((sM/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/cache.pyR& s(t__name__t
__module__t__doc__tTruetignore_require_venvtusageR RRRRRR'R&(((sM/opt/alt/python35/lib/python3.5/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
(((sM/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/commands/cache.pyt<module>s
Back to Directory File Manager