HEX
Server: LiteSpeed
System: Linux cluster02.load-balancer.x2.network 4.18.0-553.51.1.lve.1.el8.x86_64 #1 SMP Wed May 14 14:34:57 UTC 2025 x86_64
User: kbdhpghp (1098)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python33/lib64/python3.3/distutils/command/__pycache__/register.cpython-33.pyo
�
��f�-c@s�dZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlTddl
mZGdd�de�ZdS(	uhdistutils.command.register

Implements the Distutils 'register' command (register with the repository).
iN(uwarn(u
PyPIRCCommand(u*(ulogcBs�|EeZdZdZejdd gZejdddgZddd	�fgZd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zddd�ZdS(!uregisteru7register the distribution with the Python package indexulist-classifiersu list the valid Trove classifiersustrictuBWill stop the registering if the meta-data are not fully compliantuverifyucheckcCsdS(NT(uTrue(uself((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyu<lambda>suregister.<lambda>cCs#tj|�d|_d|_dS(Ni(u
PyPIRCCommanduinitialize_optionsulist_classifiersustrict(uself((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyuinitialize_optionss
	uregister.initialize_optionscCs>tj|�id|jfd6dd6}||jjd<dS(Nuregisterustrictiurestructuredtextucheck(uregisteri(u
PyPIRCCommandufinalize_optionsustrictudistributionucommand_options(uselfu
check_options((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyufinalize_options$s

uregister.finalize_optionscCsr|j�|j�x!|j�D]}|j|�q!W|jrN|j�n |jrd|j�n
|j�dS(N(	ufinalize_optionsu_set_configuget_sub_commandsurun_commandudry_runuverify_metadataulist_classifiersuclassifiersu
send_metadata(uselfucmd_name((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyurun+s

	
	
uregister.runcCsLtdt�|jjd�}|j�|j|_d|_|j�dS(uDeprecated API.uddistutils.command.register.check_metadata is deprecated,               use the check command insteaducheckiN(uwarnuPendingDeprecationWarningudistributionuget_command_objuensure_finalizedustricturestructuredtexturun(uselfucheck((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyucheck_metadata:s

	uregister.check_metadatacCs�|j�}|ikrX|d|_|d|_|d|_|d|_d|_nU|jd|jfkr�td|j��n|jdkr�|j|_nd	|_dS(
u: Reads the configuration file and set attributes.
        uusernameupasswordu
repositoryurealmupypiu%s not found in .pypircNTF(
u_read_pypircuusernameupasswordu
repositoryurealmuTrueu
has_configuDEFAULT_REPOSITORYu
ValueErroruFalse(uselfuconfig((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyu_set_configDs



uregister._set_configcCs9|jd}tjj|�}tj|j|��dS(u8 Fetch the list of classifiers from the server.
        u?:action=list_classifiersN(u
repositoryuurlliburequestuurlopenuloguinfou_read_pypi_response(uselfuurluresponse((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyuclassifiersUs
uregister.classifierscCs9|j|jd��\}}tjd||f�dS(uF Send the metadata to the package index server to be checked.
        uverifyuServer response (%s): %sN(upost_to_serverubuild_post_datauloguinfo(uselfucodeuresult((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyuverify_metadata\suregister.verify_metadatac
Cs�|jr$d}|j}|j}nd}d}}dj�}xT||kr�|jdtj�t�}|szd}qC||krCtd�qCqCW|dkrx|s�td�}q�Wx|s�t	j	d�}q�Wt
jj�}t
j
j|j�d	}|j|j|||�|j|jd
�|�\}}|jd||ftj�|dkr�|jr{||j_q
|jd
tj�|jd|j�tj�d}x1|j�dkr�td�}|s�d}q�q�W|j�dkr
|j||�q
q�n�|dkridd6}	d|	d<|	d<|	d<d#|	d<x|	dsmtd�|	d<qPWx�|	d|	dkrx!|	ds�t	j	d�|	d<q�Wx!|	ds�t	j	d�|	d<q�W|	d|	dkrqd|	d<d#|	d<td�qqqqWx|	ds&td�|	d<q	W|j|	�\}}|dkrbtjd||f�q�tjd�tjd�ns|d kr�id!d6}	d|	d<x|	ds�td"�|	d<q�W|j|	�\}}tjd||f�nd#S($u_ 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.

        u1uxuu1 2 3 4u�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]: u&Please choose one of the four options!u
Username: u
Password: iusubmituServer response (%s): %si�uAI can store your PyPI login so future submissions will be faster.u (the login will be stored in %s)uXuynuSave your login (y/N)?unuyu2uuseru:actionunameupassworduemailuconfirmu
 Confirm: u!Password and confirm don't match!u
   EMail: u"You will receive an email shortly.u7Follow the instructions in it to complete registration.u3upassword_resetuYour email address: N(u
has_configuusernameupasswordusplituannounceuloguINFOuinputuprintugetpassuurlliburequestuHTTPPasswordMgruparseuurlparseu
repositoryuadd_passwordurealmupost_to_serverubuild_post_dataudistributionu_get_rc_fileuloweru
_store_pypircuNoneuinfo(
uselfuchoiceuusernameupassworduchoicesuauthuhostucodeuresultudata((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyu
send_metadatacs�		

				
		
	












uregister.send_metadatacCs|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(Nu:actionu1.0umetadata_versionunameuversionusummaryu	home_pageuauthoruauthor_emailulicenseudescriptionukeywordsuplatformuclassifiersudownload_urluprovidesurequiresu	obsoletesu1.1(udistributionumetadatauget_nameuget_versionuget_descriptionuget_urluget_contactuget_contact_emailuget_licenceuget_long_descriptionuget_keywordsu
get_platformsuget_classifiersuget_download_urluget_providesuget_requiresu
get_obsoletes(uselfuactionumetaudata((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyubuild_post_data�s,














uregister.build_post_datacCs�d|kr3|jd|d|jftj�nd}d|}|d}tj�}x�|j�D]�\}}t|�tg�tf�fkr�|g}nxx|D]p}t|�}|j	|�|j	d|�|j	d�|j	|�|r�|dd	kr�|j	d
�q�q�WqfW|j	|�|j	d
�|j
�jd�}id|d
6tt|��d6}	t
jj|j||	�}
t
jjt
jjd|��}d}y|j|
�}Wn�t
jjk
r#}
z2|jr�|
jj�}n|
j|
jf}WYdd}
~
Xn[t
jjk
r_}
zdt|
�f}WYdd}
~
XnX|jrx|j�}nd}|jr�dd}|jd|||f�n|S(uC Post a query to the server, and return a string response.
        unameuRegistering %s to %su3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254u
--u--u*
Content-Disposition: form-data; name="%s"u

iu
u
uutf-8u/multipart/form-data; boundary=%s; charset=utf-8uContent-typeuContent-lengthupassword_mgruNi�i�uOKu-iKu%s%r%si����(i�uOK(uannounceu
repositoryuloguINFOuiouStringIOuitemsutypeustruwriteugetvalueuencodeulenuurlliburequestuRequestubuild_openeruHTTPBasicAuthHandleruopenuerroru	HTTPErroru
show_responseufpureaducodeumsguURLError(uselfudatauauthuboundaryusep_boundaryuend_boundaryubodyukeyuvalueuheadersurequopeneruresultueudashes((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyupost_to_server�sX



$





		$%		
uregister.post_to_serverN(ulist-classifiersNu list the valid Trove classifiers(ustrictNuBWill stop the registering if the meta-data are not fully compliant(u__name__u
__module__u__qualname__udescriptionu
PyPIRCCommanduuser_optionsuNoneuboolean_optionsusub_commandsuinitialize_optionsufinalize_optionsurunucheck_metadatau_set_configuclassifiersuverify_metadatau
send_metadataubuild_post_dataupost_to_server(u
__locals__((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyuregisters&

zuregister(u__doc__uosustringugetpassuiouurllib.parseuurllibuurllib.requestuwarningsuwarnudistutils.coreu
PyPIRCCommandudistutils.errorsu	distutilsuloguregister(((u?/opt/alt/python33/lib64/python3.3/distutils/command/register.pyu<module>s$