ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/
Upload File :
Current File : //proc/self/root/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyc

�
Bu�_c@s]ddlZddlmZddlZddlZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZyddlZWnek
r�dZnXddlZddlZddlZddlZddlZyddlZWnek
r-ddlZnXddlZddlmZddlmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1e
j2e3�Z4e
j5d�Z6e
j5d�Z7e
j5d	�Z8e
j5d
�Z9e
j5d�Z:e
j5d�Z;e
j5d
�Z<e
j5d�Z=d�Z>d�Z?d�Z@d�ZAd�ZBddd�ZCd�ZDd�ZEd�ZFejGd��ZHejGd��ZIejGdd��ZJdeKfd��YZLd�ZMdeKfd ��YZNd!�ZOd"eKfd#��YZPe
j5d$e
jQ�ZRd%�ZSdd&�ZTd'�ZUd(�ZVd)�ZWd*�ZXd+�ZYe
j5d,e
jZ�Z[e
j5d-�Z\dd.�Z]e
j5d/�Z^d0�Z_d1�Z`d2�Zad3Zbd4�Zcd5�Zdd6eKfd7��YZed8eKfd9��YZfd:eKfd;��YZgdqZhdeidC�ZjdD�ZkdrZldKeKfdL��YZme
j5dM�Zne
j5dN�Zoe
j5dO�ZpdP�ZdQ�Zqer.ddRlmrZsmtZtmuZudSe%jvfdT��YZvdUesfdV��YZrdWere(fdX��YZwnejxdY Zyeydskr�d[e%jzfd\��YZzer�d]e%j{fd^��YZ{q�nd_e&j|fd`��YZ|er�dae&j}fdb��YZ}ndce&j~fdd��YZ~de�ZdfeKfdg��YZ�dhe�fdi��YZ�dje�fdk��YZ�dle)fdm��YZ�dneKfdo��YZ�dp�Z�dS(ti����N(tdeque(tiglobi(tDistlibException(tstring_typest	text_typetshutilt	raw_inputtStringIOtcache_from_sourceturlopenturljointhttplibt	xmlrpclibt	splittypetHTTPHandlertBaseConfiguratortvalid_identt	ContainertconfigparsertURLErrortZipFiletfsdecodetunquoteturlparses^([\w\.-]+)\s*s^([\w\.*+-]+)\s*s^(<=?|>=?|={2,3}|[~!]=)\s*s*^((<=?)|(>=?)|={2,3}|[~!]=|in|not\s+in)\s*s^or\b\s*s	^and\b\s*s(\S+)\s*s(([\s\w\.{}()*+#:;,/?!~`@$%^&=|<>\[\]-]+)csCd����fd���fd���fd���|�S(se
    Parse a marker string and return a dictionary containing a marker expression.

    The dictionary will contain keys "op", "lhs" and "rhs" for non-terminals in
    the expression grammar, or strings. A string contained in quotes is to be
    interpreted as a literal string, and a string not contained in quotes is a
    variable (such as os_name).
    cSs�tj|�}|r8|j�d}||j�}nH|sMtd��n3|d}|dkrvtd|��ndj|d�}|d}|g}x�|r4|d|kr�Pq�|d|kr�|j|�|d}q�tj|�}|s
td|��n|j|j�d�||j�}q�Wdj|�}td|��|j|�dj|�}|dj	�}||fS(	Nisunexpected end of inputs'"sinvalid expression: %stiserror in string literal: %ssunterminated string: %s(
t
IDENTIFIERtmatchtgroupstendtSyntaxErrortreplacetappendtSTRING_CHUNKtjointlstrip(t	remainingtmtresulttqtoqtpartsts((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt
marker_varAs:

		


cs�|rh|ddkrh�|dj��\}}|ddkrUtd|��n|dj�}n��|�\}}xp|r�tj|�}|s�Pn|j�d}||j�}�|�\}}i|d6|d6|d6}q}W|}||fS(	Nit(it)sunterminated parenthesis: %stoptlhstrhs(R"Rt	MARKER_OPRRR(R#R%R.R$R-R/(tmarkerR*(sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytmarker_expres 	cs�|�\}}x`|rttj|�}|s4Pn||j�}�|�\}}idd6|d6|d6}qW||fS(NtandR-R.R/(tANDRR(R#R.R$R/(R2(sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt
marker_andxs	cs�|�\}}x`|rttj|�}|s4Pn||j�}�|�\}}idd6|d6|d6}qW||fS(NtorR-R.R/(tORRR(R#R.R$R/(R5(sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR1�s	((t
marker_string((R1R5R2R*sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytparse_marker8s
		$cCs?|j�}|s"|jd�r&dStj|�}|sNtd|��n|j�d}||j�}d}}}}|r�|ddkr�|jdd�}|dkr�td|��n|d|!}	||dj	�}g}x�|	r�tj|	�}|std|	��n|j
|j�d�|	|j�}	|	sPPn|	dd	krstd
|	��n|	dj	�}	q�W|s�d}q�n|r^|ddkrA|dj	�}tj|�}|s�td|��n|j�d}t|�}
|
j
o|
js(td
|��n||j�j	�}q^d�}|ddkro||�\}}q^|jdd�}|dkr�td|��n|d|!}	||dj	�}tj|	�r�||	�\}}q^tj|	�}|s
td|	��n|j�d}
|	|j�j	�}	|	rLtd|	��nd|
fg}n|r�|ddkr�td|��n|dj	�}t|�\}}n|r�|ddkr�td|��n|s�|}n0d|djg|D]}d|^q��f}td|d|d|d|d|d|�S( s�
    Parse a requirement passed in as a string. Return a Container
    whose attributes contain the various parts of the requirement.
    t#sname expected: %sit[t]isunterminated extra: %ssmalformed extra: %st,scomma expected in extras: %st@sinvalid URI: %ssInvalid URL: %scSstj|�}d}|rg}x�tr�|j�d}||j�}tj|�}|srtd|��n|j�d}|j||f�||j�}|s�|ddkr�Pn|dj	�}tj|�}|s$td|��q$q$W|sd}qn||fS(s|
                Return a list of operator, version tuples if any are
                specified, else None.
                isinvalid version: %sR=isinvalid constraint: %sN(
t
COMPARE_OPRtNonetTrueRRtVERSION_IDENTIFIERRRR"(t
ver_remainingR$tversionsR-tv((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytget_versions�s,	R+R,sunterminated parenthesis: %ssinvalid constraint: %ss~=t;sinvalid requirement: %ssunexpected trailing data: %ss%s %ss, tnametextrastconstraintsR1turltrequirementN(tstript
startswithR@RRRRRtfindR"Rt	NON_SPACERtschemetnetlocR?RBR9R!R(treqR#R$tdistnameRIt	mark_exprRDturitiR)ttRFt_REtrstcon((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytparse_requirement�s�
		
	0cCs�d�}i}x�|D]�\}}}tjj||�}x�t|�D]�}tjj||�}	x�t|	�D]v}
|||
�}|dkr�|j|d�qo|||
�}|jtjjd�jd�}
|
d|||<qoWqGWqW|S(s%Find destinations for resources filescSs\|jtjjd�}|jtjjd�}|j|�sEt�|t|�jd�S(Nt/(RtostpathtsepRNtAssertionErrortlenR"(trootR_((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytget_rel_path
sR]N(	R^R_R!RR@tpopRR`trstrip(tresources_roottrulesRdtdestinationstbasetsuffixtdesttprefixtabs_basetabs_globtabs_patht
resource_filetrel_pathtrel_dest((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytget_resources_dests
s	!cCs:ttd�rt}ntjttdtj�k}|S(Ntreal_prefixtbase_prefix(thasattrtsysRARmtgetattr(R%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytin_venv$s	cCs7tjjtj�}t|t�s3t|�}n|S(N(R^R_tnormcaseRxt
executablet
isinstanceRR(R%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytget_executable.s
cCs�|}xwtrt|�}|}|r7|r7|}n|r	|dj�}||kr]Pn|r|d|||f}q|q	q	W|S(Nis	%c: %s
%s(RARtlower(tpromptt
allowed_charsterror_prompttdefaulttpR)tc((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytproceed>s	
	cCsVt|t�r|j�}ni}x+|D]#}||kr+||||<q+q+W|S(N(R}Rtsplit(tdtkeysR%tkey((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytextract_by_keyNs
cCs�tjddkr+tjd�|�}n|j�}t|�}y�tj|�}|ddd}xo|j�D]a\}}xR|j�D]D\}}d||f}t	|�}	|	dk	s�t�|	||<q�WqtW|SWn!tk
r|j
dd�nXd�}
tj�}y|
||�WnFtjk
rp|j�tj|�}t|�}|
||�nXi}xz|j�D]l}i||<}xU|j|�D]D\}
}d|
|f}t	|�}	|	dk	s�t�|	||
<q�Wq�W|S(	Niisutf-8t
extensionsspython.exportstexportss%s = %scSs0t|d�r|j|�n
|j|�dS(Nt	read_file(RwR�treadfp(tcptstream((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytread_streamks(Rxtversion_infotcodecst	getreadertreadRtjsontloadtitemstget_export_entryR@Rat	ExceptiontseekRtConfigParsertMissingSectionHeaderErrortclosettextwraptdedenttsections(R�tdatatjdataR%tgrouptentriestkRER)tentryR�R�R�RHtvalue((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytread_exportsWsD
	
cCs�tjddkr+tjd�|�}ntj�}x�|j�D]�\}}|j|�x�|j�D]u}|j	dkr�|j}nd|j|j	f}|jr�d|dj
|j�f}n|j||j|�qjWqDW|j|�dS(Niisutf-8s%s:%ss%s [%s]s, (RxR�R�t	getwriterRR�R�tadd_sectiontvaluesRkR@RmtflagsR!tsetRHtwrite(R�R�R�R�RER�R)((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt
write_exports�s
	ccs*tj�}z	|VWdtj|�XdS(N(ttempfiletmkdtempRtrmtree(ttd((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyttempdir�s	ccs7tj�}ztj|�dVWdtj|�XdS(N(R^tgetcwdtchdir(R�tcwd((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s

	iccs7tj�}ztj|�dVWdtj|�XdS(N(tsockettgetdefaulttimeouttsetdefaulttimeout(tsecondstcto((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytsocket_timeout�s

	tcached_propertycBseZd�Zdd�ZRS(cCs
||_dS(N(tfunc(tselfR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt__init__�scCs<|dkr|S|j|�}tj||jj|�|S(N(R@R�tobjectt__setattr__t__name__(R�tobjtclsR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt__get__�s
N(R�t
__module__R�R@R�(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	cCs�tjdkr|S|s|S|ddkr@td|��n|ddkrctd|��n|jd�}x#tj|kr�|jtj�quW|s�tjStjj|�S(s�Return 'pathname' as a name that will work on the native filesystem.

    The path is split on '/' and put back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    R]ispath '%s' cannot be absolutei����spath '%s' cannot end with '/'(R^R`t
ValueErrorR�tcurdirtremoveR_R!(tpathnametpaths((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytconvert_path�s
tFileOperatorcBs�eZed�Zd�Zd�Zd�Zed�Zdd�Z
d�Zd�Zd�Z
d	�Zd
�Zeeded�Zd�Zd
�Zd�Zd�ZRS(cCs#||_t�|_|j�dS(N(tdry_runR�tensuredt_init_record(R�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	cCs%t|_t�|_t�|_dS(N(tFalsetrecordR�t
files_writtentdirs_created(R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	cCs |jr|jj|�ndS(N(R�R�tadd(R�R_((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytrecord_as_written�s	cCsitjj|�s1tdtjj|���ntjj|�sGtStj|�jtj|�jkS(s�Tell if the target is newer than the source.

        Returns true if 'source' exists and is more recently modified than
        'target', or if 'source' exists and 'target' doesn't.

        Returns false if both exist and 'target' is the same age or younger
        than 'source'. Raise PackagingFileError if 'source' does not exist.

        Note that this test is not very accurate: files created in the same
        second will have the same "age".
        sfile '%r' does not exist(R^R_texistsRtabspathRAtstattst_mtime(R�tsourcettarget((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytnewer�scCs�|jtjj|��tjd||�|js�d}|r�tjj|�r`d|}q�tjj	|�r�tjj
|�r�d|}q�n|r�t|d��ntj
||�n|j|�dS(s8Copy a file respecting dry-run and force flags.
        sCopying %s to %ss%s is a symlinks%s is a non-regular files which would be overwrittenN(t
ensure_dirR^R_tdirnametloggertinfoR�R@tislinkR�tisfileR�RtcopyfileR�(R�tinfiletoutfiletchecktmsg((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt	copy_files	
%cCs�tjj|�st�|jtjj|��tjd||�|js�|dkrlt
|d�}ntj
|dd|�}ztj
||�Wd|j�Xn|j|�dS(NsCopying stream %s to %stwbtwtencoding(R^R_tisdirRaR�R�R�R�R�R@topenR�RtcopyfileobjR�R�(R�tinstreamR�R�t	outstream((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytcopy_streams	cCs}|jtjj|��|jsltjj|�rDtj|�nt|d��}|j|�WdQXn|j	|�dS(NR�(
R�R^R_R�R�R�R�R�R�R�(R�R_R�tf((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytwrite_binary_file!s	cCs|j||j|��dS(N(R�tencode(R�R_R�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytwrite_text_file*scCs�tjdks-tjdkr�tjdkr�xj|D]_}|jrVtjd|�q4tj|�j|B|@}tjd||�tj||�q4WndS(Ntposixtjavaschanging mode of %sschanging mode of %s to %o(	R^RHt_nameR�R�R�R�tst_modetchmod(R�tbitstmasktfilesR�tmode((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytset_mode-s-
	cCs|jdd|�S(Nimi�(R(R)R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt<lambda>9scCs�tjj|�}||jkr�tjj|�r�|jj|�tjj|�\}}|j|�tj	d|�|j
s�tj|�n|jr�|j
j|�q�ndS(NsCreating %s(R^R_R�R�R�R�R�R�R�R�R�tmkdirR�R�(R�R_R�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�;s"
		c	Cs�t||�}tjd||�|js�|sD|j||�r{|sSd}q{|j|�sht�|t|�}ni}|r�t	t
d�r�t
jj|d<nt
j
|||t|�n|j|�|S(NsByte-compiling %s to %stPycInvalidationModetinvalidation_mode(RR�R�R�R�R@RNRaRbRwt
py_compileRtCHECKED_HASHtcompileRAR�(	R�R_toptimizetforceRmthashed_invalidationtdpathtdiagpathtcompile_kwargs((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytbyte_compileGs		
cCstjj|�rtjj|�r�tjj|�r�tjd|�|js`tj	|�n|j
r||jkr�|jj|�q�qqtjj|�r�d}nd}tjd||�|js�tj|�n|j
r||j
kr|j
j|�qqndS(NsRemoving directory tree at %stlinktfilesRemoving %s %s(R^R_R�R�R�R�tdebugR�RR�R�R�R�R�(R�R_R)((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytensure_removedXs"%					cCsjt}x]|setjj|�r:tj|tj�}Pntjj|�}||kr\Pn|}q	W|S(N(R�R^R_R�taccesstW_OKR�(R�R_R%tparent((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytis_writablems	
cCs/|jst�|j|jf}|j�|S(sV
        Commit recorded changes, turn off recording, return
        changes.
        (R�RaR�R�R�(R�R%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytcommitys
cCs�|js�x9t|j�D](}tjj|�rtj|�qqWt|jdt	�}xq|D]f}tj
|�}|r�|dgks�t�tjj||d�}tj
|�ntj
|�qaWn|j�dS(Ntreverset__pycache__i(R�tlistR�R^R_R�R�tsortedR�RAtlistdirRaR!trmdirR�(R�R�tdirsR�tflisttsd((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytrollback�s	
N(R�R�R�R�R�R�R�RAR�R@R�R�R�Rtset_executable_modeR�RRRRR%(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s 												
cCs�|tjkrtj|}nt|�}|dkr@|}nG|jd�}t||jd��}x|D]}t||�}qnW|S(Nt.i(Rxtmodulest
__import__R@R�RyRe(tmodule_nametdotted_pathtmodR%R(R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytresolve�s	
tExportEntrycBs;eZd�Zed��Zd�Zd�ZejZRS(cCs(||_||_||_||_dS(N(RHRmRkR�(R�RHRmRkR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s			cCst|j|j�S(N(R-RmRk(R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��scCs d|j|j|j|jfS(Ns<ExportEntry %s = %s:%s %s>(RHRmRkR�(R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt__repr__�scCsdt|t�st}nH|j|jko]|j|jko]|j|jko]|j|jk}|S(N(R}R.R�RHRmRkR�(R�totherR%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt__eq__�s	(	R�R�R�R�R�R/R1R�t__hash__(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR.�s
			
s�(?P<name>(\w|[-.+])+)
                      \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
                      \s*(\[\s*(?P<flags>[\w-]+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
                      cCsStj|�}|sId}d|ks3d|krOtd|��qOn|j�}|d}|d}|jd�}|dkr�|d}}n4|dkr�td|��n|jd�\}}|d	}	|	dkrd|ks�d|kr	td|��ng}	n(g|	jd
�D]}
|
j�^q"}	t||||	�}|S(NR;R<sInvalid specification '%s'RHtcallablet:iiR�R=(	tENTRY_REtsearchR@Rt	groupdicttcountR�RMR.(t
specificationR$R%R�RHR_tcolonsRmRkR�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s2




	(cCs|d
krd}ntjdkrHdtjkrHtjjd�}ntjjd�}tjj|�r�tj|tj	�}|s�t
jd|�q�nGytj|�t
}Wn-tk
r�t
jd|dt
�t}nX|s	tj�}t
jd	|�ntjj||�S(s�
    Return the default base location for distlib caches. If the directory does
    not exist, it is created. Use the suffix provided for the base directory,
    and default to '.distlib' if it isn't provided.

    On Windows, if LOCALAPPDATA is defined in the environment, then it is
    assumed to be a directory, and will be the parent directory of the result.
    On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
    directory - using os.expanduser('~') - will be the parent directory of
    the result.

    The result is just the directory '.distlib' in the parent directory as
    determined above, or with the name specified with ``suffix``.
    s.distlibtnttLOCALAPPDATAs
$localappdatat~s(Directory exists but is not writable: %ssUnable to create %stexc_infos#Default location unusable, using %sN(R@R^RHtenvironR_t
expandvarst
expanduserR�RRR�twarningtmakedirsRAtOSErrorR�R�R�R!(RkR%tusable((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytget_cache_base�s&	



cCs`tjjtjj|��\}}|r?|jdd�}n|jtjd�}||dS(s
    Convert an absolute path to a directory name for use in a cache.

    The algorithm used is:

    #. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
    #. Any occurrence of ``os.sep`` is replaced with ``'--'``.
    #. ``'.cache'`` is appended.
    R4s---s--s.cache(R^R_t
splitdriveR�RR`(R_R�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytpath_to_cache_dir
s

$cCs|jd�s|dS|S(NR](tendswith(R)((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytensure_slashscCs�d}}d|kr^|jdd�\}}d|krC|}q^|jdd�\}}n|rst|�}n|r�t|�}n|||fS(NR>iR4(R@trsplitR�R(RRtusernametpasswordRm((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytparse_credentials$s
	cCs tjd�}tj|�|S(Ni(R^tumask(R%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytget_process_umask3s
cCsXt}d}x3t|�D]%\}}t|t�st}PqqW|dk	sTt�|S(N(RAR@t	enumerateR}RR�Ra(tseqR%RWR)((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytis_string_sequence8ss3([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-([a-z0-9_.+-]+)s
-py(\d\.?\d?)cCsd}d}t|�jdd�}tj|�}|r[|jd�}||j� }n|r�t|�t|�dkr�tj	tj
|�d|�}|r�|j�}|| ||d|f}q�n|dkrtj	|�}|r|jd�|jd�|f}qn|S(sw
    Extract name, version, python version from a filename (no extension)

    Return name, version, pyver or None
    t t-is\biN(
R@RRtPYTHON_VERSIONR6R�tstartRbtreRtescapeRtPROJECT_NAME_AND_VERSION(tfilenametproject_nameR%tpyverR$tn((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytsplit_filenameGs""!'s-(?P<name>[\w .-]+)\s*\(\s*(?P<ver>[^\s)]+)\)$cCsRtj|�}|s(td|��n|j�}|dj�j�|dfS(s�
    A utility method used to get name and version from a string.

    From e.g. a Provides-Dist value.

    :param p: A value in a form 'foo (1.0)'
    :return: The name and version as a tuple.
    s$Ill-formed name/version string: '%s'RHtver(tNAME_VERSION_RERRR7RMR(R�R$R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytparse_name_and_versioncs
	cCs	t�}t|pg�}t|p'g�}d|krS|jd�||O}nx�|D]�}|dkr||j|�qZ|jd�r�|d}||kr�tjd|�n||kr|j|�qqZ||kr�tjd|�n|j|�qZW|S(Nt*RUisundeclared extra: %s(R�R�R�RNR�RB(t	requestedt	availableR%trtunwanted((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt
get_extrasrs&	



cCs�i}yqt|�}|j�}|jd�}|jd�sRtjd|�n$tjd�|�}tj	|�}Wn&t
k
r�}tjd||�nX|S(NsContent-Typesapplication/jsons(Unexpected response for JSON request: %ssutf-8s&Failed to get external data for %s: %s(R	R�tgetRNR�RR�R�R�R�R�t	exception(RKR%tresptheaderstcttreaderte((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt_get_external_data�ss'https://www.red-dove.com/pypi/projects/cCs9d|dj�|f}tt|�}t|�}|S(Ns%s/%s/project.jsoni(tupperR
t_external_data_base_urlRp(RHRKR%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytget_project_data�scCs6d|dj�||f}tt|�}t|�S(Ns%s/%s/package-%s.jsoni(RqR
RrRp(RHtversionRK((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytget_package_data�stCachecBs)eZdZd�Zd�Zd�ZRS(s�
    A class implementing a cache for resources that need to live in the file system
    e.g. shared libraries. This class was moved from resources to here because it
    could be used by other modules, e.g. the wheel module.
    cCsvtjj|�s"tj|�ntj|�jd@dkrQtjd|�ntjjtjj	|��|_
dS(su
        Initialise an instance.

        :param base: The base directory where the cache should be located.
        i?isDirectory '%s' is not privateN(R^R_R�RCR�R�R�RBR�tnormpathRj(R�Rj((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s
cCs
t|�S(sN
        Converts a resource prefix to a directory name in the cache.
        (RH(R�Rm((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt
prefix_to_dir�scCs�g}x�tj|j�D]�}tjj|j|�}yZtjj|�s^tjj|�rntj|�n"tjj|�r�t	j
|�nWqtk
r�|j|�qXqW|S(s"
        Clear the cache.
        (
R^R RjR_R!R�R�R�R�RR�R�R(R�tnot_removedtfn((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytclear�s$
(R�R�t__doc__R�RxR{(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRv�s		t
EventMixincBs>eZdZd�Zed�Zd�Zd�Zd�ZRS(s1
    A very simple publish/subscribe system.
    cCs
i|_dS(N(t_subscribers(R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��scCs\|j}||kr+t|g�||<n-||}|rK|j|�n
|j|�dS(s`
        Add a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be added (and called when the
                           event is published).
        :param append: Whether to append or prepend the subscriber to an
                       existing subscriber list for the event.
        N(R~RRt
appendleft(R�teventt
subscriberRtsubstsq((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s
	
cCs=|j}||kr(td|��n||j|�dS(s�
        Remove a subscriber for an event.

        :param event: The name of an event.
        :param subscriber: The subscriber to be removed.
        sNo subscribers: %rN(R~R�R�(R�R�R�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	cCst|jj|d��S(s�
        Return an iterator for the subscribers for an event.
        :param event: The event to return subscribers for.
        ((titerR~Ri(R�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytget_subscribersscOs�g}xa|j|�D]P}y||||�}Wn$tk
rXtjd�d}nX|j|�qWtjd||||�|S(s^
        Publish a event and return a list of values returned by its
        subscribers.

        :param event: The event to publish.
        :param args: The positional arguments to pass to the event's
                     subscribers.
        :param kwargs: The keyword arguments to pass to the event's
                       subscribers.
        s"Exception during event publications/publish %s: args = %s, kwargs = %s, result = %sN(R�R�R�RjR@RR(R�R�targstkwargsR%R�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytpublishs


	(	R�R�R|R�RAR�R�R�R�(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR}�s			t	SequencercBsheZd�Zd�Zed�Zd�Zd�Zd�Zd�Z	e
d��Ze
d��ZRS(	cCs"i|_i|_t�|_dS(N(t_predst_succsR�t_nodes(R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�"s		cCs|jj|�dS(N(R�R�(R�tnode((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytadd_node'scCs
||jkr"|jj|�n|r	x3t|jj|d��D]}|j||�qDWx3t|jj|d��D]}|j||�qzWx6t|jj��D]\}}|s�|j|=q�q�Wx9t|jj��D]\}}|s�|j|=q�q�WndS(N(((R�R�R�R�RiR�RR�(R�R�tedgesR�R)R�RE((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytremove_node*s""""cCsT||kst�|jj|t��j|�|jj|t��j|�dS(N(RaR�t
setdefaultR�R�R�(R�tpredtsucc((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�:scCs�||kst�y|j|}|j|}Wn!tk
rStd|��nXy|j|�|j|�Wn'tk
r�td||f��nXdS(Ns%r not a successor of anythings%r not a successor of %r(RaR�R�tKeyErrorR�R�(R�R�R�tpredstsuccs((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�?s



cCs+||jkp*||jkp*||jkS(N(R�R�R�(R�tstep((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytis_stepLscCs�|j|�s"td|��ng}g}t�}|j|�x�|r�|jd�}||kr�||kr�|j|�|j|�q�qG|j|�|j|�|jj|d�}|j	|�qGWt
|�S(NsUnknown: %ri((R�R�R�RReR�R�R�Ritextendtreversed(R�tfinalR%ttodotseenR�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt	get_stepsPs"	
	


csydg�g�i�i�g�|j��������fd��x'�D]}|�krR�|�qRqRW�S(Nics@�d�|<�d�|<�dcd7<�j|�y�|}Wntk
r`g}nXxl|D]d}|�kr��|�t�|�|��|<qh|�krht�|�|��|<qhqhW�|�|kr<g}x3tr�j�}|j|�||kr�Pq�q�Wt|�}�j|�ndS(Nii(RR�tminRARettuple(R�t
successorst	successortconnected_componentt	component(tgraphtindext
index_countertlowlinksR%tstackt
strongconnect(sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�ts.




"	
(R�(R�R�((R�R�R�R�R%R�R�sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytstrong_connectionsis		!"
cCs�dg}xF|jD];}|j|}x%|D]}|jd||f�q-WqWx"|jD]}|jd|�q\W|jd�dj|�S(Nsdigraph G {s  %s -> %s;s  %s;t}s
(R�RR�R!(R�R%R�R�R�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytdot�s	


(
R�R�R�R�R�R�R�R�R�R�tpropertyR�R�(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�!s				
		3s.tar.gzs.tar.bz2s.tars.zips.tgzs.tbzs.whlc
s���fd�}tjj���t���d}|dkr�|jd�rZd}q�|jd�rxd}d}q�|jd�r�d}d}q�|jd
�r�d}d}q�td|��nz|dkrt|d�}|rZ|j�}x|D]}||�q�WqZnBt	j
||�}|rZ|j�}x|D]}||�qCWn|dkr�tj
ddkr�xA|j�D]0}	t|	jt�s�|	jjd�|	_q�q�Wn|j��Wd|r�|j�nXdS(Ncs|t|t�s!|jd�}ntjjtjj�|��}|j��se|�tjkrxt	d|��ndS(Nsutf-8spath outside destination: %r(
R}RtdecodeR^R_R�R!RNR`R�(R_R�(tdest_dirtplen(sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt
check_path�s
!#s.zips.whltzips.tar.gzs.tgzttgzsr:gzs.tar.bz2s.tbzttbzsr:bz2s.tarttarRfsUnknown format for %riisutf-8(s.zips.whl(s.tar.gzs.tgz(s.tar.bz2s.tbz(R^R_R�RbR@RIR�RtnamelistttarfileR�tgetnamesRxR�t
getmembersR}RHRR�t
extractallR�(
tarchive_filenameR�tformatR�R�tarchiveRtnamesRHttarinfo((R�R�sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt	unarchive�sH				

c	Cs�tj�}t|�}t|d��}xutj|�D]d\}}}xR|D]J}tjj||�}||}	tjj|	|�}
|j||
�qPWq:WWdQX|S(s*zip a directory tree into a BytesIO objectR�N(	tiotBytesIORbRR^twalkR_R!R�(t	directoryR%tdlentzfRcR"RRHtfulltrelRl((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytzip_dir�s

RtKtMtGtTtPtProgresscBs�eZdZddd�Zd�Zd�Zd�Zd�Zed��Z	ed	��Z
d
�Zed��Zed��Z
RS(
tUNKNOWNiidcCsV|dks||kst�||_|_||_d|_d|_t|_dS(Ni(	R@RaR�tcurtmaxtstartedtelapsedR�tdone(R�tminvaltmaxval((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s			cCs}|j|kst�|jdks9||jks9t�||_tj�}|jdkri||_n||j|_dS(N(R�RaR�R@R�ttimeR�R�(R�tcurvaltnow((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytupdates$	cCs*|dkst�|j|j|�dS(Ni(RaR�R�(R�tincr((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt	incrementscCs|j|j�|S(N(R�R�(R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRWscCs/|jdk	r"|j|j�nt|_dS(N(R�R@R�RAR�(R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytstopscCs|jdkr|jS|jS(N(R�R@tunknown(R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytmaximumscCsZ|jrd}nD|jdkr*d}n,d|j|j|j|j}d|}|S(Ns100 %s ?? %gY@s%3d %%(R�R�R@R�R�(R�R%RE((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt
percentages			"
cCsU|dkr|jdks-|j|jkr6d}ntjdtj|��}|S(Nis??:??:??s%H:%M:%S(R�R@R�R�R�tstrftimetgmtime(R�tdurationR%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytformat_duration*s-	cCs�|jrd}|j}n�d}|jdkr9d}ne|jdksZ|j|jkrcd}n;t|j|j�}||j|j:}|d|j}d||j|�fS(NtDonesETA i����iis%s: %s(R�R�R�R@R�R�tfloatR�(R�RmRX((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytETA3s		!	cCsh|jdkrd}n|j|j|j}x(tD] }|dkrLPn|d:}q6Wd||fS(Nigi�g@�@s%d %sB/s(R�R�R�tUNITS(R�R%tunit((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytspeedFs	
(R�R�R�R�R�R�RWR�R�R�R�R�R�R�(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	
					s\{([^}]*)\}s[^/\\,{]\*\*|\*\*[^/\\,}]s^[^{]*\}|\{[^}]*$cCsZtj|�r(d}t||��ntj|�rPd}t||��nt|�S(sAExtended globbing function that supports ** and {opt1,opt2,opt3}.s7invalid glob %r: recursive glob "**" must be used alones2invalid glob %r: mismatching set marker '{' or '}'(t_CHECK_RECURSIVE_GLOBR6R�t_CHECK_MISMATCH_SETt_iglob(t	path_globR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR[sccs�tj|d�}t|�dkr�t|�dksBt|��|\}}}x3|jd�D]4}x+tdj|||f��D]}|Vq�WqaWn�d|kr�x�t|�D]}|Vq�Wn�|jdd�\}}|dkr�d}n|dkr	d}n|jd�}|jd	�}x]tj	|�D]L\}}}	tj
j|�}x(ttj
j||��D]}
|
VqtWq7WdS(
NiiR=Rs**R'RcR]s\(t	RICH_GLOBR�RbRaR�R!t	std_iglobR"R^R�R_Rw(R�trich_path_globRmR�RktitemR_tradicaltdirRRz((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�fs*%		"(tHTTPSHandlertmatch_hostnametCertificateErrortHTTPSConnectioncBseZdZeZd�ZRS(c
Cs�tj|j|jf|j�}t|dt�rI||_|j�nt	t
d�s�|jrmt
j}n	t
j
}t
j||j|jd|dt
jd|j�|_n�t
jt
j�}t	t
d�r�|jt
jO_n|jr|j|j|j�ni}|jrZt
j|_|jd|j�tt
dt�rZ|j|d	<qZn|j||�|_|jr�|jr�y0t|jj�|j�tjd
|j�Wq�tk
r�|jjtj�|jj ��q�XndS(Nt_tunnel_hostt
SSLContextt	cert_reqstssl_versiontca_certstOP_NO_SSLv2tcafiletHAS_SNItserver_hostnamesHost verified: %s(!R�tcreate_connectionthosttportttimeoutRyR�tsockt_tunnelRwtsslR�t
CERT_REQUIREDt	CERT_NONEtwrap_sockettkey_filet	cert_filetPROTOCOL_SSLv23R�toptionsRtload_cert_chaintverify_modetload_verify_locationstcheck_domainR�tgetpeercertR�RR�tshutdownt	SHUT_RDWRR�(R�RR�tcontextR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytconnect�s@!	
					

N(R�R�R@R�RARR(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��sR�cBs&eZed�Zd�Zd�ZRS(cCs#tj|�||_||_dS(N(tBaseHTTPSHandlerR�R�R(R�R�R((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s
	cOs7t||�}|jr3|j|_|j|_n|S(s
            This is called to create a connection instance. Normally you'd
            pass a connection class to do_open, but it doesn't actually check for
            a class, and just expects a callable. As long as we behave just as a
            constructor would have, we should be OK. If it ever changes so that
            we *must* pass a class, we'll create an UnsafeHTTPSConnection class
            which just sets check_domain to False in the class definition, and
            choose which one to pass to do_open.
            (R�R�R(R�R�R�R%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt_conn_maker�s

	cCs_y|j|j|�SWnAtk
rZ}dt|j�krTtd|j��q[�nXdS(Nscertificate verify faileds*Unable to verify server certificate for %s(tdo_openRRtstrtreasonR�R(R�RSRo((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt
https_open�s(R�R�RAR�RR (((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	tHTTPSOnlyHandlercBseZd�ZRS(cCstd|��dS(NsAUnexpected HTTP request on what should be a secure connection: %s(R(R�RS((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt	http_open�s(R�R�R"(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR!�siitHTTPcBseZddd�ZRS(RcKs5|dkrd}n|j|j|||��dS(Ni(R@t_setupt_connection_class(R�RRR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	N(R�R�R@R�(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR#�stHTTPScBseZddd�ZRS(RcKs5|dkrd}n|j|j|||��dS(Ni(R@R$R%(R�RRR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	N(R�R�R@R�(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR&�st	TransportcBseZdd�Zd�ZRS(icCs ||_tjj||�dS(N(RRR'R�(R�Rtuse_datetime((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	cCs�|j|�\}}}tdkr<t|d|j�}nN|jsY||jdkr}||_|tj|�f|_n|jd}|S(NiiRii(ii(t
get_host_infot	_ver_infoR#Rt_connectiont_extra_headersRtHTTPConnection(R�Rthtehtx509R%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytmake_connection�s	
(R�R�R�R1(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR'�st
SafeTransportcBseZdd�Zd�ZRS(icCs ||_tjj||�dS(N(RRR2R�(R�RR(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�s	cCs�|j|�\}}}|s'i}n|j|d<tdkrUt|d|�}nT|jsr||jdkr�||_|tj|d|�f|_n|jd}|S(NRiiii(ii(	R)RR*R&R@R+R,RR�(R�RR.R/R�R%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR1s	
	
(R�R�R�R1(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR2
stServerProxycBseZd�ZRS(c	Ks�|jdd�|_}|dk	r�t|�\}}|jdd�}|dkr^t}nt}||d|�|d<}||_ntj	j
|||�dS(NRR(ithttpst	transport(ReR@RR
RiR2R'R5RR3R�(	R�RVR�RRQRYR(ttclsRX((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR� s	(R�R�R�(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR3scKsDtjddkr |d7}nd|d<d|d<t|||�S(NiitbRtnewlinesutf-8R�(RxR�R�(RzRR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt	_csv_open4s



tCSVBasecBsGeZied�d6ed�d6ed�d6Zd�Zd�ZRS(R=t	delimitert"t	quotechars
tlineterminatorcCs|S(N((R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt	__enter__FscGs|jj�dS(N(R�R�(R�R>((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt__exit__Is(R�R�RtdefaultsR?R@(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR:?s

	t	CSVReadercBs)eZd�Zd�Zd�ZeZRS(cKs�d|krM|d}tjddkrAtjd�|�}n||_nt|dd�|_tj|j|j�|_dS(NR�iisutf-8R_Rf(	RxR�R�R�R�R9tcsvRnRA(R�R�R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�Ns
cCs|S(N((R�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt__iter__YscCskt|j�}tjddkrgxBt|�D]1\}}t|t�s/|jd�||<q/q/Wn|S(Niisutf-8(tnextRnRxR�RQR}RR�(R�R%RWR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRE\s(R�R�R�RDREt__next__(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRBMs			t	CSVWritercBseZd�Zd�ZRS(cKs1t|d�|_tj|j|j�|_dS(NR�(R9R�RCtwriterRA(R�RzR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�gscCsutjddkrag}x<|D]4}t|t�rG|jd�}n|j|�q W|}n|jj|�dS(Niisutf-8(RxR�R}RR�RRHtwriterow(R�trowRfR�((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRIks
	(R�R�R�RI(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRGfs	tConfiguratorcBsHeZeej�Zded<dd�Zd�Zd�Zd�Z	RS(tinc_converttinccCs/tt|�j|�|p%tj�|_dS(N(tsuperRKR�R^R�Rj(R�tconfigRj((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR�~scs!��fd��|jd�}t|�s?�j|�}n|jdd�}|jdd�}|r�tg|D]}�|�^qs�}ng|D](}t|�r�|�||�f^q�}t|�}|||�}	|rx3|j�D]"\}
}t|	|
�|��q�Wn|	S(Ncs�t|ttf�rCt|�g|D]}�|�^q%�}njt|t�r�d|krp�j|�}q�i}x4|D]}�||�||<q}Wn�j|�}|S(Ns()(R}RR�ttypetdicttconfigure_customtconvert(toRWR%R�(RSR�(sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRS�s.
s()R's[]((	ReR3R-R@R�RRQR�tsetattr(R�ROR�tpropsR�RTR�R�R�R%R^RE((RSR�sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRR�s(5cCsI|j|}t|t�rEd|krE|j|�|j|<}n|S(Ns()(ROR}RQRR(R�R�R%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt__getitem__�s
cCsatjj|�s-tjj|j|�}ntj|ddd��}tj|�}WdQX|S(s*Default converter for the inc:// protocol.RfR�sutf-8N(	R^R_tisabsR!RjR�R�R�R�(R�R�R�R%((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRL�s
N(
R�R�RQRtvalue_convertersR@R�RRRWRL(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRKys
		tSubprocessMixincBs/eZdZedd�Zd�Zd�ZRS(sC
    Mixin for running subprocesses and capturing their output
    cCs||_||_dS(N(tverbosetprogress(R�R[R\((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyR��s	cCs�|j}|j}x{tr�|j�}|s1Pn|dk	rM|||�q|sftjjd�ntjj|jd��tjj	�qW|j
�dS(s�
        Read lines from a subprocess' output stream and either pass to a progress
        callable (if specified) or write progress information to sys.stderr.
        R'sutf-8N(R\R[RAtreadlineR@RxtstderrR�R�tflushR�(R�R�RR\R[R)((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRn�s			cKs�tj|dtjdtj|�}tjd|jd|jdf�}|j�tjd|jd|jdf�}|j�|j	�|j
�|j
�|jdk	r�|jdd�n|j
r�tjjd�n|S(NtstdoutR^R�R�sdone.tmainsdone.
(t
subprocesstPopentPIPEt	threadingtThreadRnR`RWR^twaitR!R\R@R[RxR�(R�tcmdR�R�tt1tt2((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytrun_command�s$
$



	N(R�R�R|R�R@R�RnRk(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyRZ�s	cCstjdd|�j�S(s,Normalize a python package name a la PEP 503s[-_.]+RU(RXtsubR(RH((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pytnormalize_name�s(s.tar.gzs.tar.bz2s.tars.zips.tgzs.tbzs.whl(RR�R�R�R�R�(ii(�R�tcollectionsRt
contextlibRCtglobRR�R�R�tloggingR^R	RXR�R
tImportErrorR@RbRxR�R�R�Retdummy_threadingR�RRtcompatRRRRRRR	R
RRR
RRRRRRRRRRt	getLoggerR�R�RRRBR?R0R7R4RPR R9R\RtRzR~R�R�R�R�tcontextmanagerR�R�R�R�R�R�R�R-R.tVERBOSER5R�RFRHRJRNRPRStIRZRVR_RaRbRhRpRrRsRuRvR}R�tARCHIVE_EXTENSIONSRAR�R�R�R�R�R�R�R�R�RR�R�R�R!R�R*R#R&R'R2R3R9R:RBRGRKRZRm(((sI/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/distlib/util.pyt<module>s�


�	Y	y		
				/	
		�		)					
						,H�6	]		+)	
	7.

Zerion Mini Shell 1.0