%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/distutils/command/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/distutils/command/__pycache__/check.cpython-38.pyc

U

qa@sdZddlmZddlmZzTddlmZddlmZddl	m
Z
ddl	mZddlm
Z
Gd	d
d
eZdZWnek
rdZYnXGd
ddeZdS)zCdistutils.command.check

Implements the Distutils 'check' command.
)Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc@seZdZd	ddZddZdS)
SilentReporterNrasciireplacec
Cs"g|_t||||||||dSN)messagesr__init__)selfsourcereport_level
halt_levelstreamdebugencoding
error_handlerr3/usr/local/lib/python3.8/distutils/command/check.pyrszSilentReporter.__init__cOs6|j||||ftj|f|||j|d|S)N)leveltype)r
appendrsystem_messageZlevels)rrmessageZchildrenkwargsrrrrszSilentReporter.system_message)Nrr
r)__name__
__module____qualname__rrrrrrr	s
r	TFc@s`eZdZdZdZdddgZdddgZd	d
ZddZd
dZ	ddZ
ddZddZddZ
dS)checkz6This command checks the meta-data of the package.
    z"perform some checks on the package)metadatamzVerify meta-data)restructuredtextrzEChecks if long string meta-data syntax are reStructuredText-compliant)strictsz(Will exit with an error if a check failsr#r%r'cCsd|_d|_d|_d|_dS)z Sets default values for options.rN)r%r#r'	_warningsrrrrinitialize_options1szcheck.initialize_optionscCsdSrrr+rrrfinalize_options8szcheck.finalize_optionscCs|jd7_t||S)z*Counts the number of warnings that occurs.r))r*rwarn)rmsgrrrr.;sz
check.warncCsL|jr||jr0tr"|n|jr0td|jrH|jdkrHtddS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r#check_metadatar%HAS_DOCUTILScheck_restructuredtextr'rr*r+rrrrun@s
z	check.runcCs|jj}g}dD]"}t||r(t||s||q|rL|dd||jrd|js|dn"|j	r||j
s|dn
|ddS)zEnsures that all required elements of meta-data are supplied.

        name, version, URL, (author and author_email) or
        (maintainer and maintainer_email)).

        Warns if any are missing.
        )nameversionZurlzmissing 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 suppliedN)distributionr#hasattrgetattrrr.joinZauthorZauthor_emailZ
maintainerZmaintainer_email)rr#missingattrrrrr0Pszcheck.check_metadatacCsX|j}||D]>}|dd}|dkr8|d}nd|d|f}||qdS)z4Checks if the long string fields are reST-compliant.lineNr)z%s (line %s))r6Zget_long_description_check_rst_datagetr.)rdatawarningr=rrrr2ns

zcheck.check_restructuredtextc
Cs|jjp
d}t}tjtfd}d|_d|_d|_t	||j
|j|j|j
|j|jd}tj|||d}||dz|||Wn:tk
r}z|jdd|d	ifW5d}~XYnX|jS)
z8Returns warnings when the provided data doesn't compile.zsetup.py)Z
componentsN)rrrr)rr<z!Could not finish the parsing: %s.)r6Zscript_namerrZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesr	rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerrdocumentZnote_sourceparseAttributeErrorr
r)rr@source_pathparserZsettingsZreporterrDerrrr>ys.zcheck._check_rst_dataN)rr r!__doc__descriptionZuser_optionsZboolean_optionsr,r-r.r3r0r2r>rrrrr"$s
r"N)rJZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrriorr	r1	Exceptionr"rrrr<module>s


Zerion Mini Shell 1.0