MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.4/distutils/command/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/distutils/command/register.pyo
mò
Ñ=Ec@s‚dZdZdkZdkZdkZdkZdkZdkZdkZdk	Z	dk
lZdkTdefd„ƒYZ
dS(shdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
s8$Id: register.py 38753 2005-03-31 14:16:30Z doerwalter $N(sCommand(t*tregistercBs“tZdZdZdddefddgZd
ddgZd„Zd„Zd
„Z	d„Z
d„Zd„Zd„Z
d„Zdd„ZRS(Ns7register the distribution with the Python package indexshttp://www.python.org/pypisrepository=trsurl of repository [default: %s]slist-classifierss list the valid Trove classifierss
show-responses&display full response text from servertverifycCsd|_d|_d|_dS(Ni(tNonetselft
repositoryt
show_responsetlist_classifiers(R((t0/usr/lib/python2.4/distutils/command/register.pytinitialize_options s		cCs$|idjo|i|_ndS(N(RRRtDEFAULT_REPOSITORY(R((R	tfinalize_options%scCsH|iƒ|io|iƒn#|io|iƒn|iƒdS(N(Rtcheck_metadatatdry_runtverify_metadataRtclassifierst
send_metadata(R((R	trun)s


cCsï|ii}g}x?dD]7}t||ƒo
t||ƒp|i|ƒqqW|o!|idt	i
|dƒƒn|io#|ip|iddƒqënC|i
o#|ip|idd	ƒqën|id
ddƒd
S(sïEnsure that all required elements of meta-data (name, version,
           URL, (author and author_email) or (maintainer and
           maintainer_email)) are supplied by the Distribution object; warn if
           any are missing.
        tnametversionturlsmissing required meta-data: s, s)missing meta-data: if 'author' supplied, s#'author_email' must be supplied toos-missing meta-data: if 'maintainer' supplied, s''maintainer_email' must be supplied toos4missing meta-data: either (author and author_email) s%or (maintainer and maintainer_email) smust be suppliedN(snamesversionR(Rtdistributiontmetadatatmissingtattrthasattrtgetattrtappendtwarntstringtjointauthortauthor_emailt
maintainertmaintainer_email(RRRR((R	R
2s  !



cCs%ti|idƒ}|iƒGHdS(s8 Fetch the list of classifiers from the server.
        s?:action=list_classifiersN(turllib2turlopenRRtresponsetread(RR&((R	RPscCs1|i|idƒƒ\}}d||fGHdS(sF Send the metadata to the package index server to be checked.
        RsServer response (%s): %sN(Rtpost_to_servertbuild_post_datatcodetresult(RR*R+((R	RVsc
CsŠd}d}}d,}tiidƒoƒtii	tiddƒ}
tii|
ƒoPd|
GHtiƒ}|i
|
ƒ|iddƒ}|iddƒ}d	}q¬nd
iƒ}xF||jo8dGtƒ}|p
d	}q»||jo	dGHq»q»W|d	jo£x|ptd
ƒ}qWx|ptidƒ}q,Wtiƒ}ti|iƒd}|id|||ƒ|i|idƒ|ƒ\}}	d||	fGHtiidƒoë|d,joÞ|djoÑtii	tiddƒ}
dGHd|
GHd}x5|iƒdjo!tdƒ}|p
d}qqW|iƒdjoRt |
dƒ}|i"d||fƒ|i#ƒyti$|
dƒWq©q©Xq­q†nÖ|djoWhdd <}d|d!<|d<|d"<d,|d#<x |d!ptd
ƒ|d!<qôWx˜|d|d#jo‚x#|dptidƒ|d<q/Wx#|d#ptid$ƒ|d#<qUW|d|d#jod|d<d,|d#<d%GHqqWx |d"ptd&ƒ|d"<q²W|i|ƒ\}}	|djod||	fGHq†d'GHd(GHnr|d)jodhdd*<}d|d"<x |d"ptd+ƒ|d"<q>W|i|ƒ\}}	d||	fGHnd,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
            [server-login] containing username and password entries (both
            in clear text). Eg:

                [server-login]
                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.

        txttHOMEs.pypircsUsing PyPI login from %ssserver-logintusernametpasswordt1s1 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: itpypitsubmitsServer 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)?tntytws'[server-login]
username:%s
password:%s
i€t2s:actiontuserRtemailtconfirms
 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(&tchoiceR/R0Rtconfigtostenvironthas_keytpathRtrctexiststConfigParserR'tgettsplittchoicest	raw_inputtgetpassR$tHTTPPasswordMgrtauthturlparseRRthosttadd_passwordR(R)R*R+tlowertopentftwritetclosetchmodtdata(
RR/R*RTRXRNR?RPRJR+RER0R@((R	R]s°
	

	


-	





	

cCsÜ|ii}hd|<dd<d|iƒ<d|iƒ<d|iƒ<d|iƒ<d|i	ƒ<d	|i
ƒ<d
|iƒ<d|iƒ<d|i
ƒ<d
|iƒ<d|iƒ<d|iƒ<}|S(Ns:actiontmetadata_versions1.0RRtsummaryt	home_pageR R!tlicensetdescriptiontkeywordstplatformRtdownload_url(RRRtmetatactiontget_nametget_versiontget_descriptiontget_urltget_contacttget_contact_emailtget_licencetget_long_descriptiontget_keywordst
get_platformstget_classifierstget_download_urlRX(RRbRaRX((R	R)×sÌcCsDd}d|}	|	d}tiƒ}xÇ|iƒD]¹\}
}t	|ƒt	gƒjo
|g}nx„|D]|}t
|ƒidƒ}|i|	ƒ|id|
ƒ|idƒ|i|ƒ|o"|ddjo|id	ƒqlqlWq3W|i|ƒ|id	ƒ|i
ƒ}hd
d|<dtt|ƒƒ<}ti|i||ƒ}titid
|ƒƒ}d}y|i|ƒ}
Wnptij
o8}|io|ii ƒ}n|i!|i"f}
nKti#j
o}dt|ƒf}
n"X|io|
i ƒ}nd}
|ioddG|GddGHn|
S(sC Post a query to the server, and return a string response.
        s3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--sutf-8s*
Content-Disposition: form-data; name="%s"s

iÿÿÿÿs
s
sContent-types/multipart/form-data; boundary=%s; charset=utf-8sContent-lengthtpassword_mgrR-iôiÈtOKt-iKN(iÈRp($tboundarytsep_boundarytend_boundarytStringIOtbodyRXtitemstkeytvaluettypetunicodetencodeRUtgetvaluetstrtlentheadersR$tRequestRRtreqtbuild_openertHTTPBasicAuthHandlerRNtopenerRSR+t	HTTPErrorteRtfpR'R*tmsgtURLError(RRXRNRtRvR‡R‚R€R…RsRxRrRyR+((R	R(ísN








(


(slist-classifiersNs list the valid Trove classifiers(s
show-responseNs&display full response text from server(t__name__t
__module__R]RRtuser_optionstboolean_optionsR
RRR
RRRR)R((((R	Rs								z	(t__doc__t__revision__tsysRARR$RLRORuRGtdistutils.coretCommandtdistutils.errorsR(RLRRRuRR$R‘R“RORARG((R	t?s6


Anon7 - 2021