<!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>
B
    YI~d                 @   s   d dl mZ d dlmZ yTd dlmZ d dlmZ d dlm	Z	 d dlm
Z
 d dlmZ G dd	 d	eZd
ZW n ek
r   dZY nX G dd deZdS )    )Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc               @   s   e Zd Zd	ddZdd ZdS )
SilentReporterNr   asciireplacec          
   C   s"   g | _ t| ||||||| d S )N)messagesr   __init__)selfsourcereport_level
halt_levelstreamdebugencodingerror_handler r   </opt/alt/python37/lib64/python3.7/distutils/command/check.pyr      s    zSilentReporter.__init__c             O   s6   | j ||||f tj|f||| j| d|S )N)leveltype)r   appendr   system_messageZlevels)r   r   messageZchildrenkwargsr   r   r   r      s    zSilentReporter.system_message)Nr   r
   r   )__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mzVerify meta-data)restructuredtextrzEChecks if long string meta-data syntax are reStructuredText-compliant)strictsz(Will exit with an error if a check failsr"   r$   r&   c             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| |S )Nr(   )r)   r   warn)r   msgr   r   r   r,   ;   s    z
check.warnc             C   sL   | j r|   | jr0tr"|   n| jr0td| jrH| jdkrHt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 }x*dD ]"}t||r*t||s|| qW |rP| dd|  |jrh|js| d n"|j	r|j
s| d n
| d d S )N)nameversionZurlzmissing required meta-data: %sz, zLmissing meta-data: if 'author' supplied, 'author_email' must be supplied toozTmissing meta-data: if 'maintainer' supplied, 'maintainer_email' must be supplied toozimissing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied)distributionr"   hasattrgetattrr   r,   joinZauthorZauthor_emailZ
maintainerZmaintainer_email)r   r"   missingattrr   r   r   r.   P   s    
zcheck.check_metadatac             C   s\   | j  }xL| |D ]>}|d d}|d kr:|d }nd|d |f }| | qW d S )Nliner(   z%s (line %s))r4   Zget_long_description_check_rst_datagetr,   )r   dataZwarningr;   r   r   r   r0   n   s    

zcheck.check_restructuredtextc          
   C   s   | j jp
d}t }tjtfd }d|_d |_d |_t	||j
|j|j|j|j|jd}tj|||d}||d y||| W n: tk
r } z|jdd| di f W d d }~X Y nX |jS )	Nzsetup.py)Z
components   )r   r   r   r   )r   r:   z!Could not finish the parsing: %s. )r4   Zscript_namer   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   r>   source_pathparserZsettingsZreporterrA   er   r   r   r<   y   s*    
$zcheck._check_rst_dataN)r   r   r    descriptionZuser_optionsZboolean_optionsr*   r+   r,   r1   r.   r0   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	   r/   	Exceptionr!   r   r   r   r   <module>   s   
