grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a ´iã@sŒddlmZddlmZzHddlmZddlmZddlm Z ddlm Z Gdd„deƒZ d Z Wne yvd Z Yn0Gd d „d eƒZd S)é)ÚCommand)ÚDistutilsSetupError)ÚReporter)ÚParser)Úfrontend)Únodesc@seZdZd dd„Zdd„ZdS) ÚSilentReporterNrÚasciiÚreplacec Cs"g|_t ||||||||¡dS©N)ÚmessagesrÚ__init__)ÚselfÚsourceÚ report_levelÚ halt_levelÚstreamÚdebugÚencodingÚ error_handler©rú//usr/lib64/python3.9/distutils/command/check.pyr sÿzSilentReporter.__init__cOs8|j ||||f¡tj|g|¢R||j|dœ|¤ŽS)N)ÚlevelÚtype)r ÚappendrÚsystem_messageZlevels)rrÚmessageZchildrenÚkwargsrrrrsþÿþzSilentReporter.system_message)Nrr r )Ú__name__Ú __module__Ú __qualname__r rrrrrrsÿ rTFc@sXeZdZdZgd¢Zgd¢Zdd„Zdd„Zdd „Zd d „Z d d „Z dd„Z dd„Z dS)Úcheckz"perform some checks on the package))ÚmetadataÚmzVerify meta-data)ÚrestructuredtextÚrzEChecks if long string meta-data syntax are reStructuredText-compliant)ÚstrictÚsz(Will exit with an error if a check fails)r"r$r&cCsd|_d|_d|_d|_dS)Nré)r$r"r&Ú _warnings©rrrrÚinitialize_options0szcheck.initialize_optionscCsdSr rr*rrrÚfinalize_options7szcheck.finalize_optionscCs|jd7_t ||¡S)Nr()r)rÚwarn)rÚmsgrrrr-:sz check.warncCsL|jr| ¡|jr0tr"| ¡n|jr0tdƒ‚|jrH|jdkrHtdƒ‚dS)NzThe docutils package is needed.rzPlease correct your package.)r"Úcheck_metadatar$Ú HAS_DOCUTILSÚcheck_restructuredtextr&rr)r*rrrÚrun?s z check.runcCsŠ|jj}g}dD]"}t||ƒr(t||ƒs| |¡q|rL| dd |¡¡|jrd|js†| d¡n"|j r||j s†| d¡n | d¡dS)N)ÚnameÚversionÚurlzmissing required meta-data: %sz, zNmissing meta-data: if 'author' supplied, 'author_email' should be supplied toozVmissing meta-data: if 'maintainer' supplied, 'maintainer_email' should be supplied toozkmissing meta-data: either (author and author_email) or (maintainer and maintainer_email) should be supplied) Ú distributionr"ÚhasattrÚgetattrrr-ÚjoinZauthorZ author_emailZ maintainerZmaintainer_email)rr"ÚmissingÚattrrrrr/Os    zcheck.check_metadatacCsX|j ¡}| |¡D]>}|d d¡}|dur8|d}nd|d|f}| |¡qdS)NéÿÿÿÿÚliner(z %s (line %s))r6Zget_long_descriptionÚ_check_rst_dataÚgetr-)rÚdataÚwarningr=rrrr1ps  zcheck.check_restructuredtextc CsÈ|jjp d}tƒ}tjtfd� ¡}d|_d|_d|_t ||j |j |j |j |j|jd�}tj|||d�}| |d¡z| ||¡Wn<tyÀ}z$|j dd|dif¡WYd}~n d}~00|jS) Nzsetup.py)Ú componentsé)rrrr)rr<z!Could not finish the parsing: %s.Ú)r6Ú script_namerrZ OptionParserZget_default_valuesZ tab_widthZpep_referencesZrfc_referencesrrrZwarning_streamrZerror_encodingZerror_encoding_error_handlerrÚdocumentZ note_sourceÚparseÚAttributeErrorr r)rr@Ú source_pathÚparserZsettingsZreporterrFÚerrrr>{s. ú ÿzcheck._check_rst_dataN) rrr Ú descriptionZ user_optionsZboolean_optionsr+r,r-r2r/r1r>rrrrr!#s! r!N)Zdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrrrr0Ú Exceptionr!rrrrÚs