JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr ]x @sddlmZddlmZypddlmZddlmZddlm Z ddlm Z ddl m Z Gdd d eZ d ZWnek rd ZYnXGd d d eZdS))Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc@s4eZdZddddddZddZdS) SilentReporterNrasciireplacec Cs/g|_tj||||||||dS)N)messagesr__init__)selfsource report_level halt_levelstreamdebugencoding error_handlerr*/opt/alt/python35/lib64/python3.5/check.pyr s zSilentReporter.__init__cOsB|jj||||ftj||d|d|j||S)Nleveltype)r appendrsystem_messageZlevels)rrmessageZchildrenkwargsrrrrs zSilentReporter.system_message)__name__ __module__ __qualname__r rrrrrr s r TFc@seZdZdZdddgZdddgZd d Zd dZddZddZ ddZ ddZ ddZ dS)checkz"perform some checks on the packagemetadatamVerify meta-datarestructuredtextrEChecks if long string meta-data syntax are reStructuredText-compliantstricts(Will exit with an error if a check failscCs(d|_d|_d|_d|_dS)Nr)r%r"r( _warnings)rrrrinitialize_options1s   zcheck.initialize_optionscCsdS)Nr)rrrrfinalize_options8szcheck.finalize_optionscCs|jd7_tj||S)Nr+)r,rwarn)rmsgrrrr/;sz check.warncCsl|jr|j|jrDtr/|jn|jrDtd|jrh|jdkrhtddS)NzThe docutils package is needed.rzPlease correct your package.)r"check_metadatar% HAS_DOCUTILScheck_restructuredtextr(rr,)rrrrrun@s      z check.runcCs|jj}g}x9d D]1}t||o:t||s|j|qW|rn|jddj||jr|js|jddn;|j r|j s|jdd n|jd d d dS)Nnameversionurlzmissing required meta-data: %sz, z)missing meta-data: if 'author' supplied, z#'author_email' must be supplied tooz-missing meta-data: if 'maintainer' supplied, z''maintainer_email' must be supplied tooz4missing meta-data: either (author and author_email) z%or (maintainer and maintainer_email) zmust be supplied)r5r6r7) distributionr"hasattrgetattrrr/joinZauthorZ author_emailZ maintainerZmaintainer_email)rr"missingattrrrrr1Ps$          zcheck.check_metadatacCsz|jj}xd|j|D]S}|djd}|dkrQ|d}nd|d|f}|j|qWdS)Nr+linez %s (line %s))r8Zget_long_description_check_rst_datagetr/)rdatawarningr>rrrr3ns  zcheck.check_restructuredtextcCst}t}tjdtfj}d|_d|_d|_t||j |j d|j d|j d|j d|j}tj||d|}|j|d y|j||WnEtk r}z%|jjd d |d ifWYdd}~XnX|jS) NZ componentsrrrrrr+z!Could not finish the parsing: %s.r?r?)rrrZ OptionParserZget_default_valuesZ tab_widthZpep_referencesZrfc_referencesr rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerrdocumentZ note_sourceparseAttributeErrorr r)rrB source_pathparserZsettingsZreporterrFerrrr@ys*           *zcheck._check_rst_dataN)r"r#r$)r%r&r')r(r)r*) rrr descriptionZ user_optionsZboolean_optionsr-r.r/r4r1r3r@rrrrr!$s        r!N)Zdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrriorr r2 Exceptionr!rrrrs