File "check.cpython-34.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python34/lib64/python3.4/distutils/command/__pycache__/check.cpython-34.pyc
File size: 5.14 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit


h fx@sdZddlmZddlmZypddlmZddlmZddl	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@s4eZdZddddddZddZdS)	SilentReporterNrasciireplacec	Cs/g|_tj||||||||dS)N)messagesr__init__)selfsourcereport_level
halt_levelstreamdebugencoding
error_handlerr</opt/alt/python34/lib64/python3.4/distutils/command/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@seZdZdZdZdddgZddd	gZdd
ZddZddZ	ddZ
ddZddZddZ
dS)checkz6This command checks the meta-data of the package.
    z"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)z Sets default values for options.rN)r%r"r(	_warnings)rrrrinitialize_options1s			zcheck.initialize_optionscCsdS)Nr)rrrrfinalize_options8szcheck.finalize_optionscCs|jd7_tj||S)z*Counts the number of warnings that occurs.r+)r,rwarn)rmsgrrrr/;sz
check.warncCsx|jr|jn|jrMtr2|jqM|jrMtdqMn|jrt|jdkrttdndS)zRuns the command.zThe docutils package is needed.rzPlease correct your package.N)r"check_metadatar%HAS_DOCUTILScheck_restructuredtextr(rr,)rrrrrun@s	
	
	z	check.runcCs|jj}g}x<dD]4}t||o:t||s|j|qqW|rt|jddj|n|jr|js|jddqn>|j	r|j
s|jdd	qn|jd
ddd
S)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.
        nameversionurlzmissing 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 suppliedN)znamezversionr7)distributionr"hasattrgetattrrr/joinZauthorZauthor_emailZ
maintainerZmaintainer_email)rr"Zmissingattrrrrr1Ps$
						zcheck.check_metadatacCsz|jj}xd|j|D]S}|djd}|dkrQ|d}nd|d|f}|j|qWdS)z4Checks if the long string fields are reST-compliant.r+lineNz%s (line %s))r8Zget_long_description_check_rst_datagetr/)rdataZwarningr=rrrr3ns
zcheck.check_restructuredtextcCst}t}tjdtfj}d|_d|_d|_t||j	|j
d|jd|jd|j
d|j}tj||d|}|j|dy|j||WnEtk
r}z%|jjd
d
|difWYdd}~XnX|jS)z8Returns warnings when the provided data doesn't compile.Z
componentsNrrrrrr+z!Could not finish the parsing: %s.r>r>)rrrZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesr	rrZwarning_streamrZerror_encodingZerror_encoding_error_handlerrdocumentZnote_sourceparseAttributeErrorrr)rrAsource_pathparserZsettingsZreporterrDerrrr?ys*										*zcheck._check_rst_dataN)zmetadatar#r$)zrestructuredtextr&r')zstrictr)r*)rrr __doc__ZdescriptionZuser_optionsZboolean_optionsr-r.r/r4r1r3r?rrrrr!$s	r!N)rJZdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrriorr	r2	Exceptionr!rrrr<module>s