ef/JdZddlZddlmZddlmZdZGddeZdS) zdistutils.pypirc Provides the PyPIRCCommand class, the base class for the command classes that uses .pypirc in the distutils.command package. N)RawConfigParser)CommandzE[distutils] index-servers = pypi [pypi] username:%s password:%s c`eZdZdZdZdZdZdZdddezfdgZd gZ d Z d Z d Z d Z dZdZdS) PyPIRCCommandz6Base command that knows how to handle the .pypirc filezhttps://upload.pypi.org/legacy/pypiNz repository=rzurl of repository [default: %s]) show-responseNz&display full response text from serverr c|tjtjddS)zReturns rc file path.~z.pypirc)ospathjoin expanduserselfs |/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/_distutils/config.py _get_rc_filezPyPIRCCommand._get_rc_file%s(w||BG..s33Y???c|}tjtj|tjtjzdd5}|t||fzddddS#1swxYwYdS)zCreates a default .pypirc file.iwN)rr fdopenopenO_CREATO_WRONLYwriteDEFAULT_PYPIRC)rusernamepasswordrcfs r _store_pypirczPyPIRCCommand._store_pypirc)s     Yrwr2: #;UCCS I I ;Q GGNh%99 : : : ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;s BB Bc|}tj|r|d|z|jp|j}t}||| }d|vr| dd}d| dD}|gkr d|vrdg}niS|D]}d|i}| |d|d<d |jfd |j fd fD]:\} } | || r| || || <5| || <;|dkr||jdfvr|j|d <|cS|d|ks |d |kr|cSnod |vrkd }| |d r| |d }n|j}| |d| |d |||j dSiS)zReads the .pypirc file.zUsing PyPI login from %s distutilsz index-serverscfg|].}|dk|/S))strip).0servers r z.PyPIRCCommand._read_pypirc..<s=||~~++LLNN+++r rr)r repositoryrealm)rNz server-loginr)rrr,r)r-)rr rexistsannouncer,DEFAULT_REPOSITORYrreadsectionsgetsplit DEFAULT_REALM has_option) rr r,configr2 index_servers_serversr)currentkeydefaults r _read_pypirczPyPIRCCommand._read_pypirc/s     7>>"  B  MM4r9 : : :CD,CJ$&&F KKOOO((Hh&& & ; H H "/"5"5d";"; r>>))$*8 " &''F'0G*0**VZ*H*HGJ'&t'>? $"45*)33 W ",,VS993+1::fc+B+BGCLL+2GCLL ''J/;--150G -& )Z77"<0J>>&?7'< 8++'$$V\::9!'FL!A!AJJ!%!8J & 6: > > & 6: > >",$!/  rcddl}|dd}||ddd}||S)z%Read and decode a PyPI HTTP response.rNz content-typez text/plainrcharsetascii)cgi getheader parse_headerr3r1decode)rresponserA content_typeencodings r_read_pypi_responsez!PyPIRCCommand._read_pypi_responsexsd )).,GG ##L11!488GLL}}%%h///rc0d|_d|_d|_dS)zInitialize options.Nr)r,r- show_responsers rinitialize_optionsz PyPIRCCommand.initialize_optionss rcV|j |j|_|j|j|_dSdS)zFinalizes options.N)r,r0r-r5rs rfinalize_optionszPyPIRCCommand.finalize_optionss2 ? ""5DO : +DJJJ  r)__name__ __module__ __qualname____doc__r0r5r,r- user_optionsboolean_optionsrr"r=rHrKrMrrrrs@@:MJ E >ASSTIL ''O@@@;;; GGGR000 ,,,,,rr)rQr configparserrcmdrrrrTrrrWs  ((((((u,u,u,u,u,Gu,u,u,u,u,r