ó
´¼÷Xc           @   sz   d  Z  d d l Z y d d l m Z Wn! e k
 rI d d l m Z n Xd „  Z d „  Z e d k rv e d ƒ GHn  d S(   sÂ   

    webencodings.mklabels
    ~~~~~~~~~~~~~~~~~~~~~

    Regenarate the webencodings.labels module.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

iÿÿÿÿN(   t   urlopenc         C   s   |  |  j  ƒ  k s t ‚ |  S(   N(   t   lowert   AssertionError(   t   string(    (    s>   /tmp/pip-build-g7Urym/pip/pip/_vendor/webencodings/mklabels.pyt   assert_lower   s    c            sÝ   d g } g  t  j t |  ƒ j ƒ  j d ƒ ƒ D]\ } | d D]K } | d D]: } t t | ƒ ƒ j d ƒ t | d ƒ j d ƒ f ^ qJ q< q. } t d „  | Dƒ ƒ ‰  | j	 ‡  f d †  | Dƒ ƒ | j
 d	 ƒ d
 j | ƒ S(   Ns  """

    webencodings.labels
    ~~~~~~~~~~~~~~~~~~~

    Map encoding labels to their name.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

"""

# XXX Do not edit!
# This file is automatically generated by mklabels.py

LABELS = {
t   asciit	   encodingst   labelst   ut   namec         s   s!   |  ] \ } } t  | ƒ Vq d  S(   N(   t   len(   t   .0t   labelR	   (    (    s>   /tmp/pip-build-g7Urym/pip/pip/_vendor/webencodings/mklabels.pys	   <genexpr>2   s    c         3   s6   |  ], \ } } d  | d ˆ  t  | ƒ | f Vq d S(   s       %s:%s %s,
t    N(   R
   (   R   R   R	   (   t   max_len(    s>   /tmp/pip-build-g7Urym/pip/pip/_vendor/webencodings/mklabels.pys	   <genexpr>4   s   t   }t    (   t   jsont   loadsR    t   readt   decodet   reprR   t   lstript   maxt   extendt   appendt   join(   t   urlt   partst   categoryt   encodingR   R   (    (   R   s>   /tmp/pip-build-g7Urym/pip/pip/_vendor/webencodings/mklabels.pyt   generate   s    	(Nt   __main__s.   http://encoding.spec.whatwg.org/encodings.json(	   t   __doc__R   t   urllibR    t   ImportErrort   urllib.requestR   R   t   __name__(    (    (    s>   /tmp/pip-build-g7Urym/pip/pip/_vendor/webencodings/mklabels.pyt   <module>   s   		!