<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Š¹¼]x  ã               @   sÅ   d  d l  m Z d  d l m Z yp d  d l m Z d  d l m Z d  d l m	 Z	 d  d l m
 Z
 d  d l m Z Gd d	 „  d	 e ƒ Z d
 Z Wn e k
 rª d Z Yn XGd d „  d e ƒ Z d S)é    )ÚCommand)ÚDistutilsSetupError)ÚReporter)ÚParser)Úfrontend)Únodes)ÚStringIOc               @   s4   e  Z d  Z d d d d d d „ Z d d „  Z d S)	ÚSilentReporterNr   ÚasciiÚreplacec          	   C   s/   g  |  _  t j |  | | | | | | | ƒ d  S)N)Úmessagesr   Ú__init__)ÚselfÚsourceÚreport_levelÚ
halt_levelÚstreamÚdebugÚencodingÚerror_handler© r   ú*/opt/alt/python35/lib64/python3.5/check.pyr      s    	zSilentReporter.__init__c             O   sB   |  j  j | | | | f ƒ t j | | d | d |  j | | ŽS)NÚlevelÚtype)r   Úappendr   Úsystem_messageZlevels)r   r   ÚmessageZchildrenÚkwargsr   r   r   r      s    	zSilentReporter.system_message)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r   r	      s   r	   TFc               @   sˆ   e  Z d  Z d Z d d d g Z d d d g Z d d „  Z d d „  Z d d „  Z d d „  Z	 d d „  Z
 d d „  Z d d „  Z d S)Úcheckz"perform some checks on the packageÚmetadataÚmúVerify meta-dataÚrestructuredtextÚrúEChecks if long string meta-data syntax are reStructuredText-compliantÚstrictÚsú(Will exit with an error if a check failsc             C   s(   d |  _  d |  _ d |  _ d |  _ d  S)Nr   é   )r%   r"   r(   Ú	_warnings)r   r   r   r   Úinitialize_options1   s    			zcheck.initialize_optionsc             C   s   d  S)Nr   )r   r   r   r   Úfinalize_options8   s    zcheck.finalize_optionsc             C   s   |  j  d 7_  t j |  | ƒ S)Nr+   )r,   r   Úwarn)r   Úmsgr   r   r   r/   ;   s    z
check.warnc             C   sl   |  j  r |  j ƒ  |  j rD t r/ |  j ƒ  n |  j rD t d ƒ ‚ |  j rh |  j d k rh t d ƒ ‚ d  S)NzThe docutils package is needed.r   zPlease correct your package.)r"   Úcheck_metadatar%   ÚHAS_DOCUTILSÚcheck_restructuredtextr(   r   r,   )r   r   r   r   Úrun@   s    	
		z	check.runc             C   sÓ   |  j  j } g  } x9 d D]1 } t | | ƒ o: t | | ƒ s | j | ƒ q W| rn |  j d d j | ƒ ƒ | j r” | j sÏ |  j d d ƒ n; | j	 rº | j
 sÏ |  j d d	 ƒ n |  j d
 d d ƒ d  S)NÚnameÚversionÚurlzmissing 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) zmust be supplied)r5   r6   r7   )Údistributionr"   ÚhasattrÚgetattrr   r/   ÚjoinZauthorZauthor_emailZ
maintainerZmaintainer_email)r   r"   ÚmissingÚattrr   r   r   r1   P   s$    						zcheck.check_metadatac             C   sz   |  j  j ƒ  } xd |  j | ƒ D]S } | d j d ƒ } | d  k rQ | d } n d | d | f } |  j | ƒ q Wd  S)Nr+   Úlinez%s (line %s)éÿÿÿÿ)r8   Zget_long_descriptionÚ_check_rst_dataÚgetr/   )r   ÚdataÚwarningr>   r   r   r   r3   n   s    zcheck.check_restructuredtextc             C   s  t  ƒ  } t ƒ  } t j d t f ƒ j ƒ  } d | _ d  | _ d  | _ t | | j	 | j
 d | j d | j d | j d | j ƒ} t j | | d | ƒ} | j | d ƒ y | j | | ƒ WnE t k
 r} z% | j j d d	 | d
 i  f ƒ WYd  d  } ~ Xn X| j S)NZ
componentsé   r   r   r   r   r   r+   z!Could not finish the parsing: %s.Ú r?   r?   )r   r   r   ZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesr	   r   r   Zwarning_streamr   Zerror_encodingZerror_encoding_error_handlerr   ÚdocumentZnote_sourceÚparseÚAttributeErrorr   r   )r   rB   Úsource_pathÚparserZsettingsZreporterrF   Úer   r   r   r@   y   s*    										*zcheck._check_rst_dataN)r"   r#   r$   )r%   r&   r'   )r(   r)   r*   )r   r   r    ÚdescriptionZuser_optionsZboolean_optionsr-   r.   r/   r4   r1   r3   r@   r   r   r   r   r!   $   s     	r!   N)Zdistutils.corer   Zdistutils.errorsr   Zdocutils.utilsr   Zdocutils.parsers.rstr   Zdocutilsr   r   Úior   r	   r2   Ú	Exceptionr!   r   r   r   r   Ú<module>   s   
