ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
{fc           @   s   d  Z  d d l Z d d l Z d d l Z d d l m Z m Z m Z d d l m	 Z	 d d l
 Z
 d d l Z d d l m Z d d l m Z m Z d d l m Z d d l m Z d d	 l m Z d
 e f d     YZ d S(   s`   distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to PyPI).iN(   t   urlopent   Requestt	   HTTPError(   t   standard_b64encode(   t   md5(   t   DistutilsErrort   DistutilsOptionError(   t   PyPIRCCommand(   t   spawn(   t   logt   uploadc           B   sU   e  Z d  Z e j d d g Z e j d g Z d   Z d   Z d	   Z d
   Z	 RS(   s   upload binary package to PyPIt   signt   ss   sign files to upload using gpgs	   identity=t   is   GPG identity used to sign filesc         C   s>   t  j |   d |  _ d |  _ d |  _ t |  _ d  |  _ d  S(   Nt    i    (	   R   t   initialize_optionst   usernamet   passwordt   show_responset   FalseR   t   Nonet   identity(   t   self(    (    s0   /usr/lib64/python2.7/distutils/command/upload.pyR      s    				c         C   s   t  j |   |  j r/ |  j r/ t d   n  |  j   } | i  k r~ | d |  _ | d |  _ | d |  _ | d |  _	 n  |  j r |  j
 j r |  j
 j |  _ n  d  S(   Ns.   Must use --sign for --identity to have meaningR   R   t
   repositoryt   realm(   R   t   finalize_optionsR   R   R   t   _read_pypircR   R   R   R   t   distribution(   R   t   config(    (    s0   /usr/lib64/python2.7/distutils/command/upload.pyR   &   s    c         C   sX   |  j  j s! d } t |   n  x0 |  j  j D]" \ } } } |  j | | |  q. Wd  S(   NsH   Must create and upload files in one command (e.g. setup.py sdist upload)(   R   t
   dist_filesR   t   upload_file(   R   t   msgt   commandt	   pyversiont   filename(    (    s0   /usr/lib64/python2.7/distutils/command/upload.pyt   run8   s
    c   "      C   s`  t  j  |  j  \ } } } } } }	 | s6 | s6 |	 rL t d |  j   n  | dE k rk t d |   n  |  j r d d d | g }
 |  j r d |  j g |
 d	 d	 +n  t |
 d
 |  j n  t | d  } z | j   } Wd  | j	   X|  j
 j } i d d 6d d 6| j   d 6| j   d 6t j j |  | f d 6| d 6| d 6t |  j   d 6d d 6| j   d 6| j   d 6| j   d 6| j   d 6| j   d 6| j   d 6| j   d 6| j   d 6| j   d  6| j   d! 6| j   d" 6| j   d# 6| j   d$ 6} d% } | d& k rRt  j!   \ } } } | rwd' | | f } qwn% | d( k rwd) t  j  d* d+  } n  | | d, <|  j rt j j |  d- t | d-  j   f | d. <n  d/ t" |  j# d0 |  j$  } d1 } d2 | } | d3 } t% j%   } x | j&   D] \ } } t' | t(  s5| g } n  x | D]{ } t' | t)  rld4 | d5 } | d+ } n d% } | j* |  | j* d6 |  | j* |  | j* d7  | j* |  q<WqW| j* |  | j+   } |  j, d8 | |  j f t- j.  i d9 | d: 6t/ t0 |   d; 6| d< 6} t1 |  j d= | d> | } yj t2 |  } | j3   } | j4 } |  j5 rd? j6 d@ dA | j   d@ dA f  }  |  j, |  t- j.  n  WnV t7 j8 k
 r}! |  j, t/ |!  t- j9    n% t: k
 r }! |! j; } |! j4 } n X| dB k r-|  j, dC | | f t- j.  n/ dD | | f }  |  j, |  t- j9  t< |    d  S(F   Ns   Incompatible url %st   httpt   httpss   unsupported schema t   gpgs   --detach-signs   -as   --local-useri   t   dry_runt   rbt   file_uploads   :actiont   1t   protcol_versiont   namet   versiont   contentt   filetypeR!   t
   md5_digests   1.0t   metadata_versiont   summaryt	   home_paget   authort   author_emailt   licenset   descriptiont   keywordst   platformt   classifierst   download_urlt   providest   requirest	   obsoletesR   t	   bdist_rpms   built for %s %st
   bdist_dumbs   built for %st   tersei   t   comments   .asct   gpg_signatures   Basic t   :s3   --------------GHSKFJDLGDS7543FJKLFHRE75642756743254s   
--s   --
s   ;filename="%s"i    s+   
Content-Disposition: form-data; name="%s"s   

s   Submitting %s to %ss    multipart/form-data; boundary=%ss   Content-types   Content-lengtht   Authorizationt   datat   headerss   
t   -iK   i   s   Server response (%s): %ss   Upload failed (%s): %s(   R$   R%   (=   t   urlparseR   t   AssertionErrorR   R   R   R'   t   opent   readt   closeR   t   metadatat   get_namet   get_versiont   ost   patht   basenameR   t	   hexdigestt   get_descriptiont   get_urlt   get_contactt   get_contact_emailt   get_licencet   get_long_descriptiont   get_keywordst   get_platformst   get_classifierst   get_download_urlt   get_providest   get_requirest   get_obsoletesR9   t   distR   R   R   t   StringIOt   itemst
   isinstancet   listt   tuplet   writet   getvaluet   announceR	   t   INFOt   strt   lenR   R    t   getcodeR   R   t   joint   sockett   errort   ERRORR   t   codeR   ("   R   R    R!   R"   t   schemat   netloct   urlt   paramst   queryt	   fragmentst   gpg_argst   fR.   t   metaRF   RB   Rb   R-   t   idt   autht   boundaryt   sep_boundaryt   end_boundaryt   bodyt   keyt   valuet   fnRG   t   requestt   resultt   statust   reasonR   t   e(    (    s0   /usr/lib64/python2.7/distutils/command/upload.pyR   @   s    $			
	 

 
			&	(   R   R   s   sign files to upload using gpg(   s	   identity=R   s   GPG identity used to sign files(
   t   __name__t
   __module__R7   R   t   user_optionst   boolean_optionsR   R   R#   R   (    (    (    s0   /usr/lib64/python2.7/distutils/command/upload.pyR
      s    
			(   t   __doc__RQ   Rp   R9   t   urllib2R    R   R   t   base64R   RI   t	   cStringIORc   t   hashlibR   t   distutils.errorsR   R   t   distutils.coreR   t   distutils.spawnR   t	   distutilsR	   R
   (    (    (    s0   /usr/lib64/python2.7/distutils/command/upload.pyt   <module>   s   