b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 / distutils / command /
Filename/usr/lib64/python2.6/distutils/command/register.pyc
Size9.83 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 13:07
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc @s�dZdZddkZddkZddkZddkZddkZddkZddkl Z ddk
Tddk l Z de fd��YZ
dS( shdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
s9$Id: register.py 77719 2010-01-24 00:57:20Z tarek.ziade $iÿÿÿÿN(t
PyPIRCCommand(t*(tlogtregistercBs�eZdZeidgZeiddgZd�Zd�Zd�Z d�Z
d�Z d �Z d
�Z
d �Zd
d �ZRS(s7register the distribution with the Python package indexslist-classifierss list the valid Trove classifierstverifycCsti|�d|_dS(Ni(Rtinitialize_optionstlist_classifiers(tself((s2/usr/lib64/python2.6/distutils/command/register.pyRs
cCs\|i�|i�|i�|io|i�n#|io|i�n |i�dS(N(tfinalize_optionst _set_configtcheck_metadatatdry_runtverify_metadataRt classifierst
send_metadata(R((s2/usr/lib64/python2.6/distutils/command/register.pytruns




cCsï|ii}g}x?dD]7}t||�o
t||�p|i|�qqW|o!|idti|d��n|io#|i p|idd�qënC|i
o#|i p|idd �qën|id
d d �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( t distributiontmetadatathasattrtgetattrtappendtwarntstringtjointauthort author_emailt
maintainertmaintainer_email(RRtmissingtattr((s2/usr/lib64/python2.6/distutils/command/register.pyR
*s(   

 

 cCs·|i�}|hjoA|d|_|d|_|d|_|d|_t|_nZ|id|ifjotd|i��n|idjo|i|_nt |_dS(s: Reads the configuration file and set attributes.
tusernametpasswordt
repositorytrealmtpypis%s not found in .pypircN(
t _read_pypircR!R"R#R$tTruet
has_configtDEFAULT_REPOSITORYt
ValueErrortFalse(Rtconfig((s2/usr/lib64/python2.6/distutils/command/register.pyR Hs 





cCs%ti|id�}|i�GHdS(s8 Fetch the list of classifiers from the server.
s?:action=list_classifiersN(turllib2turlopenR#tread(Rtresponse((s2/usr/lib64/python2.6/distutils/command/register.pyR
YscCs1|i|id��\}}d||fGHdS(sF Send the metadata to the package index server to be checked.
RsServer response (%s): %sN(tpost_to_servertbuild_post_data(Rtcodetresult((s2/usr/lib64/python2.6/distutils/command/register.pyR _sc
Csã|iod}|i}|i}nd}d}}di�}xU||joG|idti�t�}|p
d}qE||jo dGHqEqEW|djogx|ptd�}qªWx|ptid�}qÅWt i
�}t i |i �d }|i
|i|||�|i|id
�|�\}}|id ||fti�|i o¦|d jo�|id
ti�|id|i�ti�d}x5|i�djo!td�}|p
d}qªqªW|i�djo|i||�q
qßnÒ|djoUhdd6} d| d<| d<| d<d#| d<x | dptd�| d<qOWx�| d| djo�x#| dptid�| d<q�Wx#| dptid�| d<q°W| d| djod| d<d#| d<dGHqrqrWx | dptd�| d<q
W|i| �\}}|d jod ||fGHqßdGHdGHnp|d jobhd!d6} d| d<x | dptd"�| 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
[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:actionRR"temailtconfirms
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(R!R"tsplittannounceRtINFOt raw_inputtgetpassR-tHTTPPasswordMgrturlparseR#t add_passwordR$R1R2t _get_rc_filetlowert
_store_pypirctNone(
RtchoiceR!R"tchoicestauththostR3R4tdata((s2/usr/lib64/python2.6/distutils/command/register.pyRgs�
 

 

 


 
 
  


   

 
 


 cCs|ii}h|d6dd6|i�d6|i�d6|i�d6|i�d6|i�d6|i�d 6|i�d
6|i �d 6|i
�d 6|i �d
6|i �d6|i
�d6|i�d6|i�d6|i�d6}|dp|dp |dod|d<n|S(Ns:actions1.0tmetadata_versionRRtsummaryt home_pageRRtlicenset descriptiontkeywordstplatformR
t download_urltprovidestrequirest obsoletess1.1(RRtget_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(RtactiontmetaRS((s2/usr/lib64/python2.6/distutils/command/register.pyR2Ýs, 













!cCs[|id|d|ifti�d}d|}|d}ti�}x¾|i�D]°\}}t|�tg�td�fjo
|g}nxo|D]g}|i|�|id|�|id�|i|�|o"|dd jo|id
�q�q�WqWW|i|�|id
�|i�}hd |d 6t t
|��d
6} t i |i|| �}
t i
t id|��} d}y| i|
�} Wnpt ij
o8}
|io|
ii�}n|
i|
if} nKt ij
o}
dt |
�f} n"X|io| i�}nd} |ioddG|GddGHn| S(sC Post a query to the server, and return a string response.
sRegistering %s to %sRs3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--s*
Content-Disposition: form-data; name="%s"s

iÿÿÿÿs
s
s/multipart/form-data; boundary=%s; charset=utf-8s Content-typesContent-lengtht password_mgrR7iôiÈtOKt-iK((iÈRq(RDR#RREtStringIOtitemsttypetwritetgetvaluetstrtlenR-tRequestt build_openertHTTPBasicAuthHandlertopent HTTPErrort
show_responsetfpR/R3tmsgtURLError(RRSRQtboundaryt sep_boundaryt end_boundarytbodytkeytvaluetheaderstreqtopenerR4te((s2/usr/lib64/python2.6/distutils/command/register.pyR1ùsT

 
%





  


N(slist-classifiersNs list the valid Trove classifiers(t__name__t
__module__RXRt user_optionsRNtboolean_optionsRRR
R R
R RR2R1(((s2/usr/lib64/python2.6/distutils/command/register.pyRs

      v (t__doc__t __revision__tosRR-RGRIRstdistutils.coreRtdistutils.errorst distutilsRR(((s2/usr/lib64/python2.6/distutils/command/register.pyt<module>s<