ghdZddlZddlmZddlmZeje5ddlZ ddl Z ddl Z ddl Z Gdde j jZdddn #1swxYwYGdd eZdS) zCdistutils.command.check Implements the Distutils 'check' command. N)Command)DistutilsSetupErrorc.eZdZ dfd ZdZxZS)SilentReporterNrasciireplacec dg|_t|||||||dSN)messagessuper__init__) selfsource report_level halt_levelstreamdebugencoding error_handler __class__s /builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/setuptools/_distutils/command/check.pyrzSilentReporter.__init__sADM GG   j&%=     c|j||||ftjj|g|R||j|d|S)N)leveltype)r appenddocutilsnodessystem_messagelevels)rrmessagechildrenkwargss rr zSilentReporter.system_message sf M %(F!C D D D>0@H$4;u+=LR r)Nrrr )__name__ __module__ __qualname__rr __classcell__)rs@rrrsZ #             rrcPeZdZdZdZgdZgdZdZdZdZ dZ d Z d Z d Z d S) checkz1This command checks the meta-data of the package.z"perform some checks on the package))metadatamzVerify meta-data)restructuredtextrzEChecks if long string meta-data syntax are reStructuredText-compliant)strictsz(Will exit with an error if a check fails)r+r-r/c>d|_d|_d|_d|_dS)z Sets default values for options.rN)r-r+r/ _warningsrs rinitialize_optionszcheck.initialize_options:s# !  rcdSr r4s rfinalize_optionszcheck.finalize_optionsAs rcL|xjdz c_tj||S)z*Counts the number of warnings that occurs.r2)r3rwarn)rmsgs rr:z check.warnDs$ !|D#&&&rcd|jr||jrjdtvrD |nD#t $r!}t t|d}~wwxYw|jrt d|jr|j dkrt ddSdS)zRuns the command.rNzThe docutils package is needed.rzPlease correct your package.) r+check_metadatar-globalscheck_restructuredtext TypeErrorrstrr/r3)rexcs rrunz check.runIs = "    ! ! !   MWYY&&8//1111 888-c#hh7778 M)*KLLL ; F4>A--%&DEE E F F--sA A4A//A4c|jj}g}dD](}t||ds||)|r-|dd|zdSdS)zEnsures that all required elements of meta-data are supplied. Required fields: name, version Warns if any are missing. )nameversionNzmissing required meta-data: %sz, ) distributionr+getattrrr:join)rr+missingattrs rr=zcheck.check_metadata\s$-% % %D8T400 %t$$$  M II679K9KK L L L L L M Mrc|j}||D]Y}|dd}| |d}nd|d|}||ZdS)z4Checks if the long string fields are reST-compliant.lineNr2z {} (line {}))rGget_long_description_check_rst_datagetformatr:)rdatawarningrNs rr?zcheck.check_restructuredtextns 5577++D11  G2;??6**D|!!*(// DAA IIg       rc |jjpd}tjj}tjtjjjf}d|_ d|_ d|_ t||j |j|j|j|j|j}tj|||}||d |||n8#t.$r+}|jdd|zd ifYd}~nd}~wwxYw|jS) z8Returns warnings when the provided data doesn't compile.zsetup.py) componentsN)rrrr)rrMz!Could not finish the parsing: %s.)rG script_namerparsersrstParserfrontend OptionParserget_default_values tab_widthpep_referencesrfc_referencesrrrwarning_streamrerror_encodingerror_encoding_error_handlerrdocument note_sourceparseAttributeErrorr r)rrS source_pathparsersettingsreporterrfes rrPzcheck._check_rst_dataysz'3Az !%,,..$11 (,352      "&"&!   !  *.,"?   >**8Xk*RR["---  LLx ( ( ( (      $ $81r~sF((((((Z%%0 :p!p!p!p!p!Gp!p!p!p!p!s)AAA