tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
\\¬Qc@szdZdZddlZddlZddlZddlmZddlmZddl    m
Z
defd„ƒYZ dS(    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 „Z d „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((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/register.pyt<lambda>scCs#tj|ƒd|_d|_dS(Ni(Rtinitialize_optionstlist_classifiersR(R((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/register.pyR
 s     cCs>tj|ƒid|jfd6dd6}||jjd<dS(NRRitrestructuredtextR(sregisteri(Rtfinalize_optionsRt distributiontcommand_options(Rt check_options((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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_commandst run_commandtdry_runtverify_metadataR t classifierst send_metadata(Rtcmd_name((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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
ƒ}t j |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!|    dstjdƒ|    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((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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    ƒd 6|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_emailtlicenset descriptiontkeywordstplatformRt download_urltprovidestrequirest    obsoletess1.1(Rtmetadatatget_namet get_versiontget_descriptiontget_urlt get_contacttget_contact_emailt get_licencetget_long_descriptiont get_keywordst get_platformstget_classifierstget_download_urlt get_providest get_requirest get_obsoletes(RtactiontmetaRQ((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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 |d6t t |    ƒƒ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((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/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.(((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/register.pyRs&
                
               {    ( t__doc__t __revision__R)RERGtwarningsRtdistutils.coreRt    distutilsRR(((sb/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/distutils/command/register.pyt<module>s