Mini Kabibi Habibi

Current Path : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/site-packages/pip/_internal/
Upload File :
Current File : C:/Users/ITO/AppData/Local/Programs/GIMP 2/lib/python2.7/site-packages/pip/_internal/cache.pyc

�
�+^c@s�dZddlZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZdd	lmZdd
lmZer
ddlmZmZmZmZmZddlmZdd
lmZneje �Z!d�Z"de#fd��YZ$de$fd��YZ%de%fd��YZ&de$fd��YZ'dS(sCache Management
i����N(tinterpreter_nametinterpreter_version(tcanonicalize_name(tInvalidWheelFilename(tLink(tWheel(t
TempDirectory(tMYPY_CHECK_RUNNING(tpath_to_url(tOptionaltSettListtAnytDict(tTag(t
FormatControlcCs=tj|dtdddt�}tj|jd��j�S(s'Return a stable sha224 of a dictionary.t	sort_keyst
separatorst,t:tensure_asciitascii(RR(tjsontdumpstTruethashlibtsha224tencodet	hexdigest(tdts((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyt
_hash_dict s!tCachecBsVeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	s�An abstract class - provides cache directories for data from links


        :param cache_dir: The root of the cache.
        :param format_control: An object of FormatControl class to limit
            binaries being read from the cache.
        :param allowed_formats: which formats of files the cache should store.
            ('binary' and 'source' are the only allowed values)
    cCs�tt|�j�|s2tjj|�s2t�|p;d|_||_	||_
ddh}|j
j|�|ks}t�dS(Ntsourcetbinary(tsuperR t__init__tostpathtisabstAssertionErrortNonet	cache_dirtformat_controltallowed_formatstunion(tselfR*R+R,t_valid_formats((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyR$2s		cCs�|jg}|jdk	rO|jdk	rO|jdj|j|jg��ndj|�}tj|j��j	�}|d |dd!|dd!|dg}|S(s�Get parts of part that must be os.path.joined with cache_dir

        Legacy cache key (pip < 20) for compatibility with older caches.
        t=t#iiiN(
turl_without_fragmentt	hash_nameR)thashtappendtjoinRRRR(R.tlinkt	key_partstkey_urlthashedtparts((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyt_get_cache_path_parts_legacy=s
%(cCs�i|jd6}|jdk	rA|jdk	rA|j||j<n|jrZ|j|d<nt�|d<t�|d<t|�}|d |dd!|dd!|dg}|S(	sEGet parts of part that must be os.path.joined with cache_dir
        turltsubdirectoryRRiiiN(R2R3R)R4tsubdirectory_fragmentRRR(R.R7R8R:R;((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyt_get_cache_path_partsYs	

(c	Cs�|jp|p|}|r"gS|jj|�}|jj|�sJgSg}|j|�}tjj|�r�x-tj	|�D]}|j
||f�q�Wn|j|�}tjj|�r�x-tj	|�D]}|j
||f�q�Wn|S(N(R*R+tget_allowed_formatsR,tintersectiontget_path_for_linkR%R&tisdirtlistdirR5tget_path_for_link_legacy(	R.R7tcanonical_package_namet
can_not_cachetformatst
candidatesR&t	candidatetlegacy_path((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyt_get_candidates|s&
		cCs
t��dS(N(tNotImplementedError(R.R7((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRF�scCs
t��dS(s>Return a directory to store cached items in for link.
        N(RN(R.R7((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRC�scCs
t��dS(saReturns a link to a cached item if it exists, otherwise returns the
        passed link.
        N(RN(R.R7tpackage_nametsupported_tags((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pytget�s
cCsdS(N((R.((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pytcleanup�s(t__name__t
__module__t__doc__R$R<R@RMRFRCRQRR(((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyR 's				#				tSimpleWheelCachecBs2eZdZd�Zd�Zd�Zd�ZRS(s+A cache of wheels for future installs.
    cCs#tt|�j||dh�dS(NR"(R#RVR$(R.R*R+((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyR$�scCs(|j|�}tjj|jd|�S(Ntwheels(R<R%R&R6R*(R.R7R;((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRF�scCs(|j|�}tjj|jd|�S(s�Return a directory to store cached wheels for link

        Because there are M wheels for any one sdist, we provide a directory
        to cache them in, and then consult that directory when looking up
        cache hits.

        We only insert things into the cache if they have plausible version
        numbers, so that we don't contaminate the cache with things that were
        not unique. E.g. ./package might have dozens of installs done for it
        and build a version of 0.0...and if we built and cached a wheel, we'd
        end up using the same wheel even if the source has been edited.

        :param link: The link of the sdist for which this will cache wheels.
        RW(R@R%R&R6R*(R.R7R;((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRC�sc
Csg}|s|St|�}x�|j||�D]�\}}yt|�}Wntk
raq/nXt|j�|kr�tjdj|||��q/n|j|�s�q/n|j	|j
|�||f�q/W|s�|St|�\}	}}tt
tjj||���S(NsWIgnoring cached wheel {} for {} as it does not match the expected distribution name {}.(RRMRRtnametloggertdebugtformatt	supportedR5tsupport_index_mintminRRR%R&R6(
R.R7RORPRJRGt
wheel_namet	wheel_dirtwheelt_((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRQ�s2	
(RSRTRUR$RFRCRQ(((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRV�s
			tEphemWheelCachecBs eZdZd�Zd�ZRS(sGA SimpleWheelCache that creates it's own temporary cache directory
    cCs5tdd�|_tt|�j|jj|�dS(Ntkindsephem-wheel-cache(Rt	_temp_dirR#RcR$R&(R.R+((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyR$	scCs|jj�dS(N(ReRR(R.((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRRs(RSRTRUR$RR(((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRcs	t
WheelCachecBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s�Wraps EphemWheelCache and SimpleWheelCache into a single Cache

    This Cache allows for gracefully degradation, using the ephem wheel cache
    when a certain link is not found in the simple wheel cache first.
    cCsDtt|�j||dh�t||�|_t|�|_dS(NR"(R#RfR$RVt_wheel_cacheRct_ephem_cache(R.R*R+((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyR$scCs|jj|�S(N(RgRF(R.R7((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRF%scCs|jj|�S(N(RgRC(R.R7((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRC)scCs|jj|�S(N(RhRC(R.R7((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pytget_ephem_path_for_link-scCsP|jjd|d|d|�}||k	r1|S|jjd|d|d|�S(NR7RORP(RgRQRh(R.R7RORPtretval((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRQ1s	cCs|jj�|jj�dS(N(RgRRRh(R.((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRRFs
(	RSRTRUR$RFRCRiRQRR(((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyRfs					((RURRtloggingR%tpip._vendor.packaging.tagsRRtpip._vendor.packaging.utilsRtpip._internal.exceptionsRtpip._internal.models.linkRtpip._internal.models.wheelRtpip._internal.utils.temp_dirRtpip._internal.utils.typingRtpip._internal.utils.urlsRttypingR	R
RRR
Rt#pip._internal.models.format_controlRt	getLoggerRSRYRtobjectR RVRcRf(((s;/mingw64/lib/python2.7/site-packages/pip/_internal/cache.pyt<module>s,(	�R