B
    –ìq\©  ã               @   sH   d Z ddlZddlmZ edƒZddgZddd„Zefd	d
„Zeƒ  dS )zA
Handle loading six package from system or from the bundled copy
é    N)ÚStrictVersionz1.10.0zastropy.extern.bundled.sixZsixc             C   sB   |   d¡}x,|D ]$}|dk	r"|g}t ||¡\}}}qW |||fS )zO
    Alternative to `imp.find_module` that can also search in subpackages.
    Ú.N)ÚsplitÚimpÚfind_module)ÚnameÚpathÚpartsÚpartZfhZdescr© r   ú1lib/python3.7/site-packages/astropy/extern/six.pyÚ_find_module   s    

r   c          
   C   s„   x~| D ]h}yt |ƒ}W n tk
r,   wY nX tjtf|žŽ }yt|jƒtkrPP W q tt	fk
rl   wY qX qW td 
t¡ƒ‚d S )Nz¹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   ÚImportErrorr   Úload_moduleÚ__name__r   Ú__version__Ú_SIX_MIN_VERSIONÚAttributeErrorÚ
ValueErrorÚformat)Úsearch_pathÚmod_nameZmod_infoÚmodr   r   r   Ú_import_six#   s    
r   )N)Ú__doc__r   Zdistutils.versionr   r   Z_SIX_SEARCH_PATHr   r   r   r   r   r   Ú<module>   s   
