U
    EZh_	                     @   s   d Z ddlZddlZddlZddlZddlmZ dddgZe	e
Zeddd	Zeed
ddZejdk rvejjZndeeeeee dddZdddhZejdpejdkoejdkZdS )zKStuff that differs in different Python versions and platform
distributions.    N)IOget_path_uidstdlib_pkgsWINDOWS)returnc                  C   s4   zdd l } W dS  tk
r"   Y nX ddlm} |S )Nr   T)IS_PYOPENSSL)_sslImportErrorpip._vendor.urllib3.utilr   )r   r    r   >/tmp/pip-unpacked-wheel-36xvkur8/pip/_internal/utils/compat.pyhas_tls   s    r   )pathr   c                 C   sb   t tdr6t| tjtjB }t|j}t| n(tj	| sPt
| j}nt|  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)hasattrosopenO_RDONLYr   fstatst_uidcloser   islinkstatOSError)r   fdfile_uidr   r   r   r      s    
)      utf-8strict)packageresourceencodingerrorsr   c                 C   s   t j| | jd||dS )Nr)r"   r#   )	importlib	resourcesfilesr   )r    r!   r"   r#   r   r   r   open_text_resource>   s
      r(   pythonwsgirefargparsewinclint)r   r   )__doc__importlib.resourcesr%   loggingr   systypingr   __all__	getLogger__name__loggerboolr   strintr   version_infor&   	open_textr(   r   platform
startswithnamer   r   r   r   r   <module>   s,   



      
