-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /proc/thread-self/root/usr/lib/python2.7/distutils/command/
File Upload :
Current File : //proc/thread-self/root/usr/lib/python2.7/distutils/command/register.pyc

ó
½V}]c@szdZdZddlZddlZddlZddlmZddlmZddl	m
Z
defd„ƒYZdS(	shdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
s$Id$iÿÿÿÿN(twarn(t
PyPIRCCommand(tlogtregistercBs¦eZdZejddgZejdddgZdd„fgZd„Zd	„Z	d
„Z
d„Zd„Zd
„Z
d„Zd„Zd„Zdd„ZRS(s7register the distribution with the Python package indexslist-classifierss list the valid Trove classifierststrictsBWill stop the registering if the meta-data are not fully complianttverifytcheckcCstS(N(tTrue(tself((s0/usr/lib/python2.7/distutils/command/register.pyt<lambda>scCs#tj|ƒd|_d|_dS(Ni(Rtinitialize_optionstlist_classifiersR(R((s0/usr/lib/python2.7/distutils/command/register.pyR
 s
	cCs>tj|ƒid|jfd6dd6}||jjd<dS(NRRitrestructuredtextR(sregisteri(Rtfinalize_optionsRtdistributiontcommand_options(Rt
check_options((s0/usr/lib/python2.7/distutils/command/register.pyR
%s

cCsr|jƒ|jƒx!|jƒD]}|j|ƒq!W|jrN|jƒn |jrd|jƒn
|jƒdS(N(	R
t_set_configtget_sub_commandstrun_commandtdry_runtverify_metadataRtclassifierst
send_metadata(Rtcmd_name((s0/usr/lib/python2.7/distutils/command/register.pytrun,s

	
	
cCsLtdtƒ|jjdƒ}|jƒ|j|_d|_|jƒdS(sDeprecated API.sddistutils.command.register.check_metadata is deprecated,               use the check command insteadRiN(RtPendingDeprecationWarningRtget_command_objtensure_finalizedRRR(RR((s0/usr/lib/python2.7/distutils/command/register.pytcheck_metadata;s

	cCs±|jƒ}|ikrX|d|_|d|_|d|_|d|_t|_nU|jd|jfkr†td|jƒ‚n|jdkr¤|j|_nt	|_dS(s: Reads the configuration file and set attributes.
        tusernametpasswordt
repositorytrealmtpypis%s not found in .pypircN(
t_read_pypircRRR R!Rt
has_configtDEFAULT_REPOSITORYt
ValueErrortFalse(Rtconfig((s0/usr/lib/python2.7/distutils/command/register.pyREs



cCs-tj|jdƒ}tj|jƒƒdS(s8 Fetch the list of classifiers from the server.
        s?:action=list_classifiersN(turllib2turlopenR Rtinfotread(Rtresponse((s0/usr/lib/python2.7/distutils/command/register.pyRVscCs9|j|jdƒƒ\}}tjd||fƒdS(sF Send the metadata to the package index server to be checked.
        RsServer response (%s): %sN(tpost_to_servertbuild_post_dataRR+(Rtcodetresult((s0/usr/lib/python2.7/distutils/command/register.pyR\sc
Csæ|jr$d}|j}|j}nd}d}}djƒ}xO||kr‘|jdtjƒtƒ}|szd}qC||krCdGHqCqCW|dkrx|s¶tdƒ}q¡Wx|sÒtjdƒ}qºWt	j
ƒ}tj|jƒd	}|j
|j|||ƒ|j|jd
ƒ|ƒ\}}|jd||ftjƒ|dkrâ|jrp||j_q|jd
tjƒ|jd|jƒtjƒd}x1|jƒdkrÙtdƒ}|s©d}q©q©W|jƒdkr|j||ƒqqânÝ|dkroidd6}	d|	d<|	d<|	d<d#|	d<x|	dsbtdƒ|	d<qEWx|	d|	dkrõx!|	dstjdƒ|	d<q}Wx!|	dsÁtjdƒ|	d<q¡W|	d|	dkrfd|	d<d#|	d<dGHqfqfWx|	dstdƒ|	d<qùW|j|	ƒ\}}|dkrRtjd||fƒqâtjdƒtjdƒns|d krâid!d6}	d|	d<x|	ds²td"ƒ|	d<q•W|j|	ƒ\}}tjd||fƒnd#S($s_ Send the metadata to the package index server.

            Well, do the following:
            1. figure who the user is, and then
            2. send the data as a Basic auth'ed POST.

            First we try to read the username/password from $HOME/.pypirc,
            which is a ConfigParser-formatted file with a section
            [distutils] containing username and password entries (both
            in clear text). Eg:

                [distutils]
                index-servers =
                    pypi

                [pypi]
                username: fred
                password: sekrit

            Otherwise, to figure who the user is, we offer the user three
            choices:

             1. use existing login,
             2. register as a new user, or
             3. set the password to a random string and email the user.

        t1txts1 2 3 4sâWe need to know who you are, so please choose either:
 1. use your existing login,
 2. register as a new user,
 3. have the server generate a new password for you (and email it to you), or
 4. quit
Your selection [default 1]: s&Please choose one of the four options!s
Username: s
Password: itsubmitsServer response (%s): %siÈsAI can store your PyPI login so future submissions will be faster.s (the login will be stored in %s)tXtynsSave your login (y/N)?tntyt2tusers:actiontnameRtemailtconfirms
 Confirm: s!Password and confirm don't match!s
   EMail: s"You will receive an email shortly.s7Follow the instructions in it to complete registration.t3tpassword_resetsYour email address: N(R$RRtsplittannounceRtINFOt	raw_inputtgetpassR)tHTTPPasswordMgrturlparseR tadd_passwordR!R.R/Rt_get_rc_filetlowert
_store_pypirctNoneR+(
RtchoiceRRtchoicestauththostR0R1tdata((s0/usr/lib/python2.7/distutils/command/register.pyRdsŒ		

				
		
	












cCs|jj}i|d6dd6|jƒd6|jƒd6|jƒd6|jƒd6|jƒd6|jƒd	6|jƒd
6|j	ƒd6|j
ƒd6|jƒd
6|jƒd6|j
ƒd6|jƒd6|jƒd6|jƒd6}|ds|ds|drd|d<n|S(Ns:actions1.0tmetadata_versionR<tversiontsummaryt	home_pagetauthortauthor_emailtlicensetdescriptiontkeywordstplatformRtdownload_urltprovidestrequirest	obsoletess1.1(Rtmetadatatget_nametget_versiontget_descriptiontget_urltget_contacttget_contact_emailtget_licencetget_long_descriptiontget_keywordst
get_platformstget_classifierstget_download_urltget_providestget_requirest
get_obsoletes(RtactiontmetaRQ((s0/usr/lib/python2.7/distutils/command/register.pyR/ßs,














cCs³d|kr3|jd|d|jftjƒnd}d|}|d}g}x¹|jƒD]«\}}t|ƒtgƒtdƒfkrœ|g}nxl|D]d}|j|ƒ|jd|ƒ|jdƒ|j|ƒ|r£|dd	kr£|jd
ƒq£q£Wq`W|j|ƒ|jd
ƒg}	xC|D];}
t|
tƒrd|	j|
j	dƒƒq6|	j|
ƒq6Wdj
|	ƒ}	id
|d6tt|	ƒƒd6}t
j|j|	|ƒ}t
jt
jd|ƒƒ}
d}y|
j|ƒ}Wnjt
jk
r9}|jr$|jjƒ}n|j|jf}nFt
jk
r`}dt|ƒf}nX|jry|jƒ}nd}|jr¯dd}|jd|||fƒn|S(sC Post a query to the server, and return a string response.
        R<sRegistering %s to %ss3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--s*
Content-Disposition: form-data; name="%s"s

iÿÿÿÿs
s
sutf-8R4s/multipart/form-data; boundary=%s; charset=utf-8sContent-typesContent-lengthtpassword_mgriôiÈtOKt-iKs%s%s%s((iÈRs(RBR RRCtitemsttypetappendt
isinstancetunicodetencodetjointstrtlenR)tRequesttbuild_openertHTTPBasicAuthHandlertopent	HTTPErrort
show_responsetfpR,R0tmsgtURLError(RRQROtboundarytsep_boundarytend_boundarytchunkstkeytvaluetbodytchunktheaderstreqtopenerR1tetdashes((s0/usr/lib/python2.7/distutils/command/register.pyR.ûs`



$






			
N(slist-classifiersNs list the valid Trove classifiers(sstrictNsBWill stop the registering if the meta-data are not fully compliant(t__name__t
__module__RYRtuser_optionsRLtboolean_optionstsub_commandsR
R
RRRRRRR/R.(((s0/usr/lib/python2.7/distutils/command/register.pyRs&
				
				{	(t__doc__t__revision__R)RERGtwarningsRtdistutils.coreRt	distutilsRR(((s0/usr/lib/python2.7/distutils/command/register.pyt<module>s

Copyright © 2017 || Recoded By Mr.Bumblebee