U
    „~$h_	  ã                   @   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¡pºejdkoºe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-g27rp152/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,   



   ÿ   þ
