CasperSecurity

Current Path : /lib/python3.10/distutils/command/__pycache__/
Upload File :
Current File : //lib/python3.10/distutils/command/__pycache__/check.cpython-310.pyc

o

��bc�@s�dZddlmZddlmZz$ddlmZddlmZddl	m
Z
ddl	mZGdd	�d	e�Zd
Z
Wney=dZ
YnwGdd
�d
e�ZdS)zCdistutils.command.check

Implements the Distutils 'check' command.
�)�Command)�DistutilsSetupError)�Reporter)�Parser)�frontend)�nodesc@s"eZdZ		d	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/lib/python3.10/distutils/command/check.pyr
s�zSilentReporter.__init__cOs8|j�||||f�tj|g|�R||j|d�|��S)N)�level�type)r�appendr�system_message�levels)rr�message�children�kwargsrrrrs���zSilentReporter.system_message)Nrr	r
)�__name__�
__module__�__qualname__r
rrrrrrs

�rTFc@s\eZdZdZdZgd�Zgd�Zdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dS)�checkz6This command checks the meta-data of the package.
    z"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)z Sets default values for options.r�N)r&r$r(�	_warnings�rrrr�initialize_options0s
zcheck.initialize_optionscCsdSrrr,rrr�finalize_options7szcheck.finalize_optionscCs|jd7_t�||�S)z*Counts the number of warnings that occurs.r*)r+r�warn)r�msgrrrr/:sz
check.warncCsP|jr|��|jrtr|��n|jrtd��|jr$|jdkr&td��dSdS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r$�check_metadatar&�HAS_DOCUTILS�check_restructuredtextr(rr+r,rrr�run?s
�z	check.runcCs�|jj}g}dD]}t||�rt||�s|�|�q|r&|�dd�|��|jr5|js3|�d�dSdS|j	rD|j
sB|�d�dSdS|�d�dS)a
Ensures that all required elements of meta-data are supplied.

        Required fields:
            name, version, URL

        Recommended fields:
            (author and author_email) or (maintainer and maintainer_email)

        Warns if any are missing.
        )�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 suppliedN)�distributionr$�hasattr�getattrrr/�join�author�author_email�
maintainer�maintainer_email)rr$�missing�attrrrrr1Os"
���zcheck.check_metadatacCsX|j��}|�|�D]}|d�d�}|dur|d}nd|d|f}|�|�q
dS)z4Checks if the long string fields are reST-compliant.����lineNr*z%s (line %s))r8�get_long_description�_check_rst_data�getr/)r�data�warningrCrrrr3ps

�zcheck.check_restructuredtextc
Cs�|jjpd}t�}tjtfd���}d|_d|_d|_t	||j
|j|j|j
|j|jd�}tj|||d�}|�|d�z
|�||�W|jStyd}z|j�dd|d	if�WYd}~|jSd}~ww)
z8Returns warnings when the provided data doesn't compile.zsetup.py)�
components�N)rrrr)rrBz!Could not finish the parsing: %s.�)r8�script_namerr�OptionParser�get_default_values�	tab_width�pep_references�rfc_referencesrrr�warning_streamr�error_encoding�error_encoding_error_handlerr�document�note_source�parse�AttributeErrorrr)rrG�source_path�parser�settings�reporterrU�errrrE{s4�����zcheck._check_rst_dataN)r r!r"�__doc__�description�user_options�boolean_optionsr-r.r/r4r1r3rErrrrr##s!r#N)r^�distutils.corer�distutils.errorsr�docutils.utilsr�docutils.parsers.rstr�docutilsrrrr2�	Exceptionr#rrrr�<module>s�
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY