ó
"j]c           @   s˜   d  d l  Z  d  d l Z d  d l Z e j d d k  rU e Z e j Z d d „ Z n e	 Z e j Z d d „ Z d „  Z
 d „  Z d	 „  Z d
 „  Z d S(   iÿÿÿÿNi    i   s   utf-8c         C   s    t  |  t ƒ r |  j | ƒ S|  S(   N(   t
   isinstancet   unicodet   encode(   t   st   encoding(    (    s+   /tmp/pip-install-MqWfHP/wheel/wheel/util.pyt   native   s    c         C   s    t  |  t ƒ r |  j | ƒ S|  S(   N(   R    t   bytest   decode(   R   R   (    (    s+   /tmp/pip-install-MqWfHP/wheel/wheel/util.pyR      s    c         C   s   t  j |  ƒ j d ƒ S(   s!   urlsafe_b64encode without paddingt   =(   t   base64t   urlsafe_b64encodet   rstrip(   t   data(    (    s+   /tmp/pip-install-MqWfHP/wheel/wheel/util.pyR
      s    c         C   s)   d d t  |  ƒ d @} t j |  | ƒ S(   s!   urlsafe_b64decode without paddingR   i   i   (   t   lenR	   t   urlsafe_b64decode(   R   t   pad(    (    s+   /tmp/pip-install-MqWfHP/wheel/wheel/util.pyR      s    c         C   s    t  |  t ƒ r |  j d ƒ S|  S(   Ns   utf-8(   R    R   R   (   R   (    (    s+   /tmp/pip-install-MqWfHP/wheel/wheel/util.pyt
   as_unicode%   s    c         C   s    t  |  t ƒ r |  j d ƒ S|  S(   Ns   utf-8(   R    t	   text_typeR   (   R   (    (    s+   /tmp/pip-install-MqWfHP/wheel/wheel/util.pyt   as_bytes+   s    (   R	   t   iot   syst   version_infoR   R   t   BytesIOt   StringIOR   t   strR
   R   R   R   (    (    (    s+   /tmp/pip-install-MqWfHP/wheel/wheel/util.pyt   <module>   s   					