File: //opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/glibc.pyc
�
+�Rec           @@  s   d  d l  m Z d  d l Z d  d l Z d  d l m Z e rW d  d l m Z m Z n  d �  Z	 d �  Z
 d �  Z d �  Z d S(	   i    (   t   absolute_importN(   t   MYPY_CHECK_RUNNING(   t   Optionalt   Tuplec           C@  s   t  �  p t �  S(   s9   Returns glibc version string, or None if not using glibc.(   t   glibc_version_string_confstrt   glibc_version_string_ctypes(    (    (    sJ   /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/glibc.pyt   glibc_version_string   s    c          C@  sT   t  j d k r d Sy t j d � j �  \ }  } Wn t t t f k
 rO d SX| S(   s@   Primary implementation of glibc_version_string using os.confstr.t   win32t   CS_GNU_LIBC_VERSIONN(	   t   syst   platformt   Nonet   ost   confstrt   splitt   AttributeErrort   OSErrort
   ValueError(   t   _t   version(    (    sJ   /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/glibc.pyR      s    c          C@  s�   y d d l  }  Wn t k
 r$ d SX|  j d � } y
 | j } Wn t k
 rU d SX|  j | _ | �  } t | t	 � s� | j
 d � } n  | S(   s=   Fallback implementation of glibc_version_string using ctypes.i    Nt   ascii(   t   ctypest   ImportErrorR   t   CDLLt   gnu_get_libc_versionR   t   c_char_pt   restypet
   isinstancet   strt   decode(   R   t   process_namespaceR   t   version_str(    (    sJ   /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/glibc.pyR   '