ó
.¿”Wc           @   s<   d  d l  Z  d d d „  ƒ  YZ d Z e e e ƒ j ƒ  d S(	   iÿÿÿÿNt   VendorImporterc           B   sJ   e  Z d  Z d d d „ Z e d „  ƒ Z d d „ Z d „  Z d „  Z	 RS(   s„   
    A PEP 302 meta path importer for finding optionally-vendored
    or otherwise naturally-installed packages from root_name.
    c         C   s7   | |  _  t | ƒ |  _ | p- | j d d ƒ |  _ d  S(   Nt   externt   _vendor(   t	   root_namet   sett   vendored_namest   replacet
   vendor_pkg(   t   selfR   R   R   (    (    sA   /tmp/pip-build-Q3rTTP/setuptools/pkg_resources/extern/__init__.pyt   __init__	   s    	c         c   s   |  j  d Vd Vd S(   sL   
        Search first the vendor package then as a natural package.
        t   .t    N(   R   (   R   (    (    sA   /tmp/pip-build-Q3rTTP/setuptools/pkg_resources/extern/__init__.pyt   search_path   s    c         C   sL   | j  |  j d ƒ \ } } } | r) d St t | j |  j ƒ ƒ sH d S|  S(   s†   
        Return self when fullname starts with root_name and the
        target module is one vendored through this importer.
        R
   N(   t	   partitionR   t   anyt   mapt
   startswithR   (   R   t   fullnamet   patht   roott   baset   target(    (    sA   /tmp/pip-build-Q3rTTP/setuptools/pkg_resources/extern/__init__.pyt   find_module   s    c         C   sµ   | j  |  j d ƒ \ } } } x |  j D]l } yR | | } t | ƒ t j | } | t j | <t j d k r| t j | =n  | SWq) t k
 r” q) Xq) Wt d j t	 ƒ    ƒ ‚ d S(   sK   
        Iterate over the search path to locate and load fullname.
        R
   i   s•   The '{target}' package is required; normally this is bundled with this package so if you get this warning, consult the packager of your distribution.N(   i   i   (
   R   R   R   t
   __import__t   syst   modulest   version_infot   ImportErrort   formatt   locals(   R   R   R   R   R   t   prefixt   extantt   mod(    (    sA   /tmp/pip-build-Q3rTTP/setuptools/pkg_resources/extern/__init__.pyt   load_module"   s    

c         C   s&   |  t  j k r" t  j j |  ƒ n  d S(   sR   
        Install this importer into sys.meta_path if not already present.
        N(   R   t	   meta_patht   append(   R   (    (    sA   /tmp/pip-build-Q3rTTP/setuptools/pkg_resources/extern/__init__.pyt   install?   s    (    N(
   t   __name__t
   __module__t   __doc__t   NoneR	   t   propertyR   R   R!   R$   (    (    (    sA   /tmp/pip-build-Q3rTTP/setuptools/pkg_resources/extern/__init__.pyR       s   	t	   packagingt	   pyparsingt   six(    (   s	   packagings	   pyparsings   six(   R   R    t   namesR%   R$   (    (    (    sA   /tmp/pip-build-Q3rTTP/setuptools/pkg_resources/extern/__init__.pyt   <module>   s   B