ó
P'—^c           @   s/   d  d l  m Z d „  Z d „  Z d „  Z d S(   iÿÿÿÿ(   t   VERSIONc           C   s   t  d  S(   Ni   (   R    (    (    (    s,   /tmp/pip-unpacked-wheel-lAfyT5/suit/utils.pyt   django_major_version   s    c         C   sH   t  |  ƒ } d j d „  t ƒ  Dƒ ƒ } | j | t | j ƒ  ƒ d ƒ S(   sN   
    Return value by version
    Return latest value if version not found
    t   .c         s   s   |  ] } t  | ƒ Vq d  S(   N(   t   str(   t   .0t   v(    (    s,   /tmp/pip-unpacked-wheel-lAfyT5/suit/utils.pys	   <genexpr>   s    iÿÿÿÿ(   t   args_to_dictt   joinR   t   gett   listt   values(   t   argst   version_mapt   major_version(    (    s,   /tmp/pip-unpacked-wheel-lAfyT5/suit/utils.pyt   value_by_version   s    	c         C   s-   t  t |  d d d … |  d d d … ƒ ƒ S(   sr   
    Convert template tag args to dict
    Format {% suit_bc 1.5 'x' 1.6 'y' %} to { '1.5': 'x', '1.6': 'y' }
    i    Ni   i   (   t   dictt   zip(   R   (    (    s,   /tmp/pip-unpacked-wheel-lAfyT5/suit/utils.pyR      s    N(   t   djangoR    R   R   R   (    (    (    s,   /tmp/pip-unpacked-wheel-lAfyT5/suit/utils.pyt   <module>   s   		