ó
Ð²Ebc           @   s  d  Z  d d l Z d d l Z d d l m Z d „  Z e j rL d „  Z n  e j ƒ  d k od e j Z e rs e	 n d „  Z
 y< d d	 l m Z m Z m Z m Z d d
 l m Z m Z WnW e k
 rd d l Z d d l m Z m Z m Z d d „ Z d „  Z d „  Z n Xd S(   s2   
Compatibility Support for Python 2.7 and earlier
iÿÿÿÿN(   t   sixc         C   s   |  j  | ƒ S(   sH   
    Given an HTTPMessage, return all headers matching a given key.
    (   t   get_all(   t   messaget   key(    (    s9   /tmp/pip-build-UPPWic/setuptools/setuptools/py27compat.pyt   get_all_headers   s    c         C   s   |  j  | ƒ S(   N(   t
   getheaders(   R   R   (    (    s9   /tmp/pip-build-UPPWic/setuptools/setuptools/py27compat.pyR      s    t   Linuxc         C   s   |  S(   N(    (   t   x(    (    s9   /tmp/pip-build-UPPWic/setuptools/setuptools/py27compat.pyt   <lambda>   t    i   (   t   find_modulet   PY_COMPILEDt	   PY_FROZENt	   PY_SOURCE(   t   get_frozen_objectt
   get_module(   R   R   R   c   
      C   s    |  j  d ƒ } xŠ | r› | j d ƒ } t j | | ƒ \ } } \ } } } }	 | t j k ry | pj d g } | g } q | r t d | |  f ƒ ‚ q q W|	 S(   s7   Just like 'imp.find_module()', but with package supportt   .i    t   __init__s   Can't find %r in %s(   t   splitt   popt   impR
   t   PKG_DIRECTORYt   ImportError(
   t   modulet   pathst   partst   partt   ft   patht   suffixt   modet   kindt   info(    (    s9   /tmp/pip-build-UPPWic/setuptools/setuptools/py27compat.pyR
   '   s    	(c         C   s   t  j |  ƒ S(   N(   R   R   (   R   R   (    (    s9   /tmp/pip-build-UPPWic/setuptools/setuptools/py27compat.pyR   7   s    c         C   s   t  j |  | Œ t j |  S(   N(   R   t   load_modulet   syst   modules(   R   R   R    (    (    s9   /tmp/pip-build-UPPWic/setuptools/setuptools/py27compat.pyR   :   s    (   t   __doc__R"   t   platformt   setuptools.externR    R   t   PY2t   systemt   linux_py2_asciit   strt   rmtree_safet   _impR
   R   R   R   R   R   R   R   t   None(    (    (    s9   /tmp/pip-build-UPPWic/setuptools/setuptools/py27compat.pyt   <module>   s$   			"	