
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
ÝPf@  ã            0   @   s   d Z ddlmZmZ ddlZddlZddlmZ yddlm	Z
 W n  ek
r`   ddlm	Z
 Y nX yddlmZ W n  ek
r’   ddlmZ Y nX yddlZW nR ek
rò   yddlmZ W n, ek
rì   ddlZeje_eje_Y nX Y nX yddlZdd	„ ZW n* ek
�r2   dd
lmZ dd	„ ZY nX ddddddddddg
Zejd.k�rjdZddlmZ n$ddlZe edƒZe�rŠejZndZejd/k�r®dd„ Z!d0dd„Z"ndd„ Z!d1dd„Z"d d!„ Z#d"d„ Z$d#d$„ Z%d2Z&ejd3k�rðe&d47 Z&ej'j(d*ƒ�pej'd+k�oej)d,kZ*d-d„ Z+dS )5zKStuff that differs in different Python versions and platform
distributions.é    )Úabsolute_importÚdivisionN)Ú	text_type)Ú
dictConfig)ÚOrderedDict)Ú	ipaddressc              C   s"   t jdƒt jdƒg} ttt| ƒƒS )NÚstdlibÚ
platstdlib)Ú	sysconfigÚget_pathÚsetÚfilterÚbool)Úpaths© r   ú/usr/lib/python3.6/__init__.pyÚ
get_stdlib"   s    r   )r
   c              C   s(   t jdd�t jddd�g} ttt| ƒƒS )NT)Ústandard_lib)r   Zplat_specific)r
   Zget_python_libr   r   r   )r   r   r   r   r   +   s    
Úlogging_dictConfigr   Úuses_pycacheÚconsole_to_strÚ
native_strÚget_path_uidÚstdlib_pkgsÚWINDOWSÚsamefiler   é   é   T)Úcache_from_sourcer   c             C   s.   y| j tjjƒS  tk
r(   | j dƒS X d S )NÚutf_8)ÚdecodeÚsysÚ
__stdout__ÚencodingÚUnicodeDecodeError)Úsr   r   r   r   G   s    Fc             C   s"   t | tƒr| jd|rdndƒS | S )Nzutf-8ÚreplaceÚstrict)Ú
isinstanceÚbytesr    )r%   r&   r   r   r   r   M   s    
c             C   s   | S )Nr   )r%   r   r   r   r   S   s    c             C   s   t | tƒr| jdƒS | S )Nzutf-8)r(   r   Úencode)r%   r&   r   r   r   r   V   s    

c             C   s<   t | dƒr| jƒ S | j| j| jd d  d  }|d S d S )NÚtotal_secondsé   i  é
   é   i@B i@B )Úhasattrr+   ZmicrosecondsZsecondsZdays)ZtdÚvalr   r   r   r+   ]   s    
r+   c             C   s`   t tdƒr6tj| tjtjB ƒ}tj|ƒj}tj|ƒ n&tjj	| ƒsPtj
| ƒ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_NOFOLLOWz1%s is a symlink; Will not return uid for symlinks)r/   ÚosÚopenÚO_RDONLYr1   ÚfstatÚst_uidÚcloseÚpathÚislinkÚstatÚOSError)r8   ÚfdZfile_uidr   r   r   r   e   s    

c             C   s0   t jj| ƒ}| jdƒr,|jdƒr,|dd… }|S )zl
    Expand ~ and ~user constructions.

    Includes a workaround for http://bugs.python.org/issue14768
    z~/z//é   N)r2   r8   Ú
expanduserÚ
startswith)r8   Zexpandedr   r   r   r>   ‚   s    r>   ÚpythonÚwsgirefé   é   ÚargparseÚwinZcliÚntc             C   sN   t tjdƒrtjj| |ƒS tjjtjj| ƒƒ}tjjtjj|ƒƒ}||kS dS )z>Provide an alternative for os.path.samefile on Windows/Python2r   N)r/   r2   r8   r   ÚnormcaseÚabspath)Zfile1Zfile2Zpath1Zpath2r   r   r   r   �   s
    )r   r   )r   )F)F)r@   rA   )rB   rC   )rD   ),Ú__doc__Z
__future__r   r   r2   r!   Zpip._vendor.sixr   Zlogging.configr   r   ÚImportErrorZpip.compat.dictconfigÚcollectionsr   Zpip._vendor.ordereddictr   Zpip._vendorZipaddrZ	IPAddressZ
ip_addressZ	IPNetworkZ
ip_networkr
   r   Z	distutilsÚ__all__Úversion_infor   Zimportlib.utilr   Zimpr/   r   r   r+   r   r>   r   Úplatformr?   Únamer   r   r   r   r   r   Ú<module>   sh   	


