Viewing File: /usr/lib/python3.6/site-packages/pip/compat/__pycache__/__init__.cpython-36.pyc

3

aj@0@s dZddlmZmZddlZddlZddlmZyddlm	Z
Wn ek
r`ddlm	Z
YnXyddl
mZWn ek
rddlmZYnXyddlZWnRek
ryddlmZWn,ek
rddlZeje_eje_YnXYnXyddlZdd	ZWn*ek
r2dd
lmZdd	ZYnXdd
ddddddddg
Zejd.krjdZddlmZn$ddlZe edZerejZndZejd/krddZ!d0ddZ"nddZ!d1ddZ"d d!Z#d"dZ$d#d$Z%d2Z&ejd3kre&d47Z&ej'j(d*pej'd+koej)d,kZ*d-dZ+dS)5zKStuff that differs in different Python versions and platform
distributions.)absolute_importdivisionN)	text_type)
dictConfig)OrderedDict)	ipaddresscCs"tjdtjdg}ttt|S)Nstdlib
platstdlib)	sysconfigget_pathsetfilterbool)pathsr/usr/lib/python3.6/__init__.py
get_stdlib"sr)r
cCs(tjddtjdddg}ttt|S)NT)standard_lib)rZ
plat_specific)r
Zget_python_librr
r)rrrrr+s
logging_dictConfigruses_pycacheconsole_to_str
native_strget_path_uidstdlib_pkgsWINDOWSsamefilerT)cache_from_sourcercCs.y|jtjjStk
r(|jdSXdS)Nutf_8)decodesys
__stdout__encodingUnicodeDecodeError)srrrrGsFcCs"t|tr|jd|rdndS|S)Nzutf-8replacestrict)
isinstancebytesr )r%r&rrrrMs
cCs|S)Nr)r%rrrrSscCst|tr|jdS|S)Nzutf-8)r(rencode)r%r&rrrrVs

cCs<t|dr|jS|j|j|jddd}|dSdS)N
total_secondsi
i@Bi@B)hasattrr+ZmicrosecondsZsecondsZdays)Ztdvalrrrr+]s
r+cCs`ttdr6tj|tjtjB}tj|j}tj|n&tjj	|sPtj
|j}ntd||S)a)
    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.
    
O_NOFOLLOWz1%s is a symlink; Will not return uid for symlinks)r/osopenO_RDONLYr1fstatst_uidclosepathislinkstatOSError)r8fdZfile_uidrrrres

cCs0tjj|}|jdr,|jdr,|dd}|S)zl
    Expand ~ and ~user constructions.

    Includes a workaround for http://bugs.python.org/issue14768
    z~/z//N)r2r8
expanduser
startswith)r8Zexpandedrrrr>sr>pythonwsgirefargparsewinZclintcCsNttjdrtjj||Stjjtjj|}tjjtjj|}||kSdS)z>Provide an alternative for os.path.samefile on Windows/Python2rN)r/r2r8rnormcaseabspath)Zfile1Zfile2Zpath1Zpath2rrrrs
)rr)r)F)F)r@rA)rBrC)rD),__doc__Z
__future__rrr2r!Zpip._vendor.sixrZlogging.configrrImportErrorZpip.compat.dictconfigcollectionsrZpip._vendor.ordereddictrZpip._vendorZipaddrZ	IPAddressZ
ip_addressZ	IPNetworkZ
ip_networkr
rZ	distutils__all__version_inforimportlib.utilrZimpr/rrr+rr>rplatformr?namerrrrrr<module>sh	



Back to Directory File Manager