ó •abc @`sŸdZddlmZmZddlZddlZddlmZyddlm Z Wn!e k r{ddl m Z nXyddl mZWn!e k r³ddlmZnXyddlZWn]e k r#yddlmZWq$e k rddlZeje_eje_q$XnXyddlZd„ZWn*e k ridd lmZd „ZnXd d d dddddddg Zejd)kr¶eZddlmZn3ddl Z e!e dƒZerãe jZndZejd*krd„Z#e$d„Z%nd„Z#e$d„Z%d„Z&d„Z'd„Z(d+Z)ejd,krbe)d-7Z)nej*j+d%ƒpej*d&koej,d'kZ-d(„Z.dS(.sKStuff that differs in different Python versions and platform distributions.i(tabsolute_importtdivisionN(t text_type(t dictConfig(t OrderedDict(t ipaddresscC`s1tjdƒtjdƒg}ttt|ƒƒS(Ntstdlibt platstdlib(t sysconfigtget_pathtsettfiltertbool(tpaths((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyt get_stdlib"s (RcC`s=tjdtƒtjdtdtƒg}ttt|ƒƒS(Nt standard_libt plat_specific(Rtget_python_libtTrueR R R (R ((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyR+stlogging_dictConfigRt uses_pycachetconsole_to_strt native_strt get_path_uidt stdlib_pkgstWINDOWStsamefileRii(tcache_from_sourceRcC`s9y|jtjjƒSWntk r4|jdƒSXdS(Ntutf_8(tdecodetsyst __stdout__tencodingtUnicodeDecodeError(ts((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyRGs cC`s/t|tƒr+|jd|r$dndƒS|S(Nsutf-8treplacetstrict(t isinstancetbytesR(R"R#((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyRMscC`s|S(N((R"((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyRSscC`s t|tƒr|jdƒS|S(Nsutf-8(R%Rtencode(R"R#((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyRVs cC`sHt|dƒr|jƒS|j|j|jddd}|dSdS(Nt total_secondsiii ii@Bi@B(thasattrR(t microsecondstsecondstdays(ttdtval((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyR(]s #cC`sˆttdƒrMtj|tjtjBƒ}tj|ƒj}tj|ƒn7tjj |ƒsttj |ƒj}nt d|ƒ‚|S(s) Return path's uid. Does not follow symlinks: https://github.com/pypa/pip/pull/935#discussion_r5307003 Placed this function in compat due to differences on AIX and Jython, that should eventually go away. :raises OSError: When path is a symlink or can't be read. t O_NOFOLLOWs1%s is a symlink; Will not return uid for symlinks( R)tostopentO_RDONLYR/tfstattst_uidtclosetpathtislinktstattOSError(R6tfdtfile_uid((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyRes  cC`sAtjj|ƒ}|jdƒr=|jdƒr=|d}n|S(sl Expand ~ and ~user constructions. Includes a workaround for http://bugs.python.org/issue14768 s~/s//i(R0R6t expandusert startswith(R6texpanded((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyR<‚s tpythontwsgirefiitargparsetwintclitntcC`sottjdƒr%tjj||ƒStjjtjj|ƒƒ}tjjtjj|ƒƒ}||kSdS(s>Provide an alternative for os.path.samefile on Windows/Python2RN(R)R0R6Rtnormcasetabspath(tfile1tfile2tpath1tpath2((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pyRs (ii(i(R?R@(ii(RA(/t__doc__t __future__RRR0Rtpip._vendor.sixRtlogging.configRRt ImportErrortpip.compat.dictconfigt collectionsRtpip._vendor.ordereddictRt pip._vendortipaddrt IPAddresst ip_addresst IPNetworkt ip_networkRRt distutilst__all__t version_infoRRtimportlib.utilRtimpR)tNoneRtFalseRR(RR<RtplatformR=tnameRR(((s7/usr/lib/python2.7/site-packages/pip/compat/__init__.pytsh