a
lj\ @ sx d Z ddlZddlZddlZg dZeeZedddZ e
eddd Zh d
Z
ejdprejdkorejd
kZdS )zKStuff that differs in different Python versions and platform
distributions. N)get_path_uidstdlib_pkgsWINDOWS)returnc C s2 zdd l } W dS ty Y n0 ddlm} |S )Nr T)IS_PYOPENSSL)_sslImportErrorZpip._vendor.urllib3.utilr )r r r >/usr/lib/python3.9/site-packages/pip/_internal/utils/compat.pyhas_tls s r )pathr c C sb t tdr6t| tjtjB }t|j}t| n(tj | sPt
| j}nt| d|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_NOFOLLOWz/ is a symlink; Will not return uid for symlinks)hasattrosopenO_RDONLYr
fstatst_uidcloser islinkstatOSError)r fdZfile_uidr r r
r s
r > ZpythonZwsgirefargparsewinZclint)__doc__Zloggingr sys__all__Z getLogger__name__loggerboolr strintr r platform
startswithnamer r r r r