K iRdZddlZddlmZddlmZddlmZeje 5ddl Z ddl Z ddl Z ddlZ Gdde jj ZdddGd d eZy#1swYxYw) zCdistutils.command.check Implements the Distutils 'check' command. N)ClassVar)Command)DistutilsSetupErrorc.eZdZ dfd ZdZxZS)SilentReporterc >g|_t| |||||||yN)messagessuper__init__) selfsource report_level halt_levelstreamdebugencoding error_handler __class__s i/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/setuptools/_distutils/command/check.pyr zSilentReporter.__init__s(DM G  j&%= c|jj||||ftjj|g|||j |d|S)N)leveltype)r appenddocutilsnodessystem_messagelevels)rrmessagechildrenkwargss rrzSilentReporter.system_message"sZ MM %(F!C D>>00"*/dkk%6HLR r)NFasciireplace)__name__ __module__ __qualname__r r __classcell__)rs@rrrs #  rrceZdZUdZdZgdZeeee e e fe d<gdZ eee e d<dZ dZ d Zd Zd Zd Zd Zy)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 user_options)r,r.r0boolean_optionsc<d|_d|_d|_d|_y)z Sets default values for options.FrN)r.r,r0 _warningsrs rinitialize_optionszcheck.initialize_options9s %  rcyr r7s rfinalize_optionszcheck.finalize_options@s rcX|xjdz c_tj||S)z*Counts the number of warnings that occurs.r5)r6rwarn)rmsgs rr=z check.warnCs! !||D#&&rcV|jr|j|jr5dtvr |j n|jr t d|jr|jdkDr t dyy#t $r}t t|d}~wwxYw)zRuns the command.rNzThe docutils package is needed.rzPlease correct your package.) r,check_metadatar.globalscheck_restructuredtext TypeErrorrstrr0r6)rexcs rrunz check.runHs ==    !  WY&8//1)*KLL ;;4>>A-%&DE E.;!8-c#h778sB B(B##B(c|jj}dDcgc]}t||dr|}}|r0|jdj dj |yycc}w)zEnsures that all required elements of meta-data are supplied. Required fields: name, version Warns if any are missing. )nameversionNzmissing required meta-data: {}z, ) distributionr,getattrr=formatjoin)rr,attrmissings rr@zcheck.check_metadata[sm$$--1 $PT8UD    II6==dii>PQ R   s A'A'c|jj}|j|D]:}|djd}||d}n |dd|d}|j |<y)z4Checks if the long string fields are reST-compliant.lineNr5z (line ))rJget_long_description_check_rst_datagetr=)rdatawarningrRs rrBzcheck.check_restructuredtextlsr  557++D1 G2;??6*D|!!*$QZLvQ7 IIg   rc (|jjxsd}tjjj }tj jtjjj fj}d|_ d|_ d|_ t||j|j|j|j |j"|j$}tj&j)|||}|j+|d |j-|||j2S#t.t0f$r8}|j2j5dd|d d ifYd}~|j2Sd}~wwxYw) z8Returns warnings when the provided data doesn't compile.zsetup.py) componentsN)rrrr)rrQzCould not finish the parsing: .)rJ script_namerparsersrstParserfrontend OptionParserget_default_values tab_widthpep_referencesrfc_referencesrrrwarning_streamrerror_encodingerror_encoding_error_handlerrdocument note_sourceparseAttributeErrorrCr r)rrW source_pathparsersettingsreporterrkes rrUzcheck._check_rst_datawst''33Az !!%%,,.$$11 ((,,3352    "&"&!   ! !   **..,,"?? >>**8Xk*R["-  LLx (    *     $ $015 &      s,E F#F  FN)r&r'r(__doc__ descriptionr2rlisttuplerD__annotations__r3r8r;r=rFr@rBrUr:rrr+r+)sh;6K:L(4c3m 456,VOXd3i(U ' F&S" !!rr+)rt contextlibtypingrcorererrorsrsuppress ImportErrordocutils.frontendrdocutils.nodesdocutils.parsers.rstdocutils.utilsutilsReporterrr+r:rrrsm (Z%00 :o!Go!;s 0A//A8