ó
]ščZc           @   s]   d  Z  d d l Z d d l m Z e d  Z d d g Z d d  Z e d  Z e   d S(	   sA   
Handle loading six package from system or from the bundled copy
i˙˙˙˙N(   t   StrictVersions   1.10.0s   astropy.extern.bundled.sixt   sixc         C   s`   |  j  d  } xA | D]9 } | d k	 r4 | g } n  t j | |  \ } } } q W| | | f S(   sO   
    Alternative to `imp.find_module` that can also search in subpackages.
    t   .N(   t   splitt   Nonet   impt   find_module(   t   namet   patht   partst   partt   fht   descr(    (    s1   lib/python2.7/site-packages/astropy/extern/six.pyt   _find_module   s    c         C   s   x |  D]y } y t  |  } Wn t k
 r3 q n Xt j t |  } y t | j  t k rb Pn  Wq t t	 f k
 r q q Xq Wt d j
 t    d  S(   Nsš   Astropy requires the 'six' module of minimum version {0}; normally this is bundled with the astropy package so if you get this warning consult the packager of your Astropy distribution.(   R   t   ImportErrorR   t   load_modulet   __name__R    t   __version__t   _SIX_MIN_VERSIONt   AttributeErrort
   ValueErrort   format(   t   search_patht   mod_namet   mod_infot   mod(    (    s1   lib/python2.7/site-packages/astropy/extern/six.pyt   _import_six#   s    (	   t   __doc__R   t   distutils.versionR    R   t   _SIX_SEARCH_PATHR   R   R   (    (    (    s1   lib/python2.7/site-packages/astropy/extern/six.pyt   <module>   s   