ó
©9Vc           @`  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
 Wn! e k
 r{ d d l m	 Z
 n Xy d d l Z Wn] e k
 rë y d d l m Z Wqì e k
 rç d d l Z e j e _ e j e _ qì Xn Xd d d	 d
 d d d d g Z e j d! k r2e Z d d l m Z n3 d d l Z e e d ƒ Z e r_e j Z n d Z e j d" k rŒd „  Z e d „ Z n d „  Z e d „ Z d „  Z  d „  Z! d d g Z" e j d# k ráe" j# d g ƒ n  e j$ j% d ƒ pe j$ d k oe j& d  k Z' d S($   sK   Stuff that differs in different Python versions and platform
distributions.i    (   t   absolute_importt   divisionN(   t	   text_type(   t
   dictConfig(   t	   ipaddresst   logging_dictConfigR   t   uses_pycachet   console_to_strt
   native_strt   get_path_uidt   stdlib_pkgst   WINDOWSi   i   (   t   cache_from_sourceR   c         C`  s9   y |  j  t j j ƒ SWn t k
 r4 |  j  d ƒ SXd  S(   Nt   utf_8(   t   decodet   syst
   __stdout__t   encodingt   UnicodeDecodeError(   t   s(    (    s0   /tmp/pip-build-5Z5nTX/pip/pip/compat/__init__.pyR   -   s    c         C`  s/   t  |  t ƒ r+ |  j d | r$ d n d ƒ S|  S(   Ns   utf-8t   replacet   strict(   t
   isinstancet   bytesR   (   R   R   (    (    s0   /tmp/pip-build-5Z5nTX/pip/pip/compat/__init__.pyR   3   s    c         C`  s   |  S(   N(    (   R   (    (    s0   /tmp/pip-build-5Z5nTX/pip/pip/compat/__init__.pyR   9   s    c         C`  s    t  |  t ƒ r |  j d ƒ S|  S(   Ns   utf-8(   R   R   t   encode(   R   R   (    (    s0   /tmp/pip-build-5Z5nTX/pip/pip/compat/__init__.pyR   <   s    c         C`  sH   t  |  d ƒ r |  j ƒ  S|  j |  j |  j d d d } | d Sd  S(   Nt   total_secondsi   i  i
   i   i@B i@B (   t   hasattrR   t   microsecondst   secondst   days(   t   tdt   val(    (    s0   /tmp/pip-build-5Z5nTX/pip/pip/compat/__init__.pyR   C   s    
#c         C`  sˆ   t  t d ƒ rM t j |  t j t j Bƒ } t j | ƒ j } t j | ƒ n7 t j j	 |  ƒ st t j
 |  ƒ j } n t d |  ƒ ‚ | S(   s)  
    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.
    t
   O_NOFOLLOWs1   %s is a symlink; Will not return uid for symlinks(   R   t   ost   opent   O_RDONLYR    t   fstatt   st_uidt   closet   patht   islinkt   statt   OSError(   R'   t   fdt   file_uid(    (    s0   /tmp/pip-build-5Z5nTX/pip/pip/compat/__init__.pyR	   K   s    t   pythont   wsgirefi   i   t   argparset   wint   clit   nt(   i   i   (   i   (   i   i   ((   t   __doc__t
   __future__R    R   R!   R   t   pip._vendor.sixR   t   logging.configR   R   t   ImportErrort   pip.compat.dictconfigR   t   pip._vendort   ipaddrt	   IPAddresst
   ip_addresst	   IPNetworkt
   ip_networkt   __all__t   version_infot   TrueR   t   importlib.utilR   t   impR   t   NoneR   t   FalseR   R   R	   R
   t   extendt   platformt
   startswitht   nameR   (    (    (    s0   /tmp/pip-build-5Z5nTX/pip/pip/compat/__init__.pyt   <module>   sN   				"