/usr/lib64/python3.6/distutils/command/__pycache__
Edit: /usr/lib64/python3.6/distutils/command/__pycache__/check.cpython-36.opt-2.pyc (4657B)
3
\x @ s d dl mZ d dlmZ yTd dlmZ d dlmZ d dlm Z d dlm
Z
d dlmZ G dd d eZ
d
ZW n ek
r dZY nX G dd
d
eZdS ) )Command)DistutilsSetupError)Reporter)Parser)frontend)nodes)StringIOc @ s e Zd Zd ddZdd ZdS )
SilentReporterNr asciireplacec C s" g | _ tj| ||||||| d S )N)messagesr __init__)selfsourcereport_level
halt_levelstreamdebugencoding
error_handler r //usr/lib64/python3.6/distutils/command/check.pyr
s zSilentReporter.__init__c O s6 | j j||||f tj|f||| j| d|S )N)leveltype)r appendr system_messageZlevels)r r messageZchildrenkwargsr r r r s zSilentReporter.system_message)Nr r
r )__name__
__module____qualname__r
r r r r r r s
r TFc @ s\ e Zd ZdZdddgZdddgZdd Zd
d Zdd Zdd Z dd Z
dd Zdd ZdS )checkz"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 failsc C s d| _ d| _d| _d| _d S )Nr )r% r" r( _warnings)r r r r initialize_options1 s zcheck.initialize_optionsc C s d S )Nr )r r r r finalize_options8 s zcheck.finalize_optionsc C s | j d7 _ tj| |S )Nr+ )r, r warn)r msgr r r r/ ; s z
check.warnc C sL | j r| j | jr0tr"| j n| jr0td| jrH| jdkrHtdd S )NzThe docutils package is needed.r zPlease correct your package.)r" check_metadatar% HAS_DOCUTILScheck_restructuredtextr( r r, )r r r r run@ s
z check.runc C s | j j}g }x*d
D ]"}t||o(t||s|j| qW |rP| jddj| |jrh|js| jd n"|j r|j
s| jd n
| jd d S )Nnameversionurlzmissing 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 supplied)r5 r6 r7 zLmissing meta-data: if 'author' supplied, 'author_email' must be supplied toozTmissing meta-data: if 'maintainer' supplied, 'maintainer_email' must be supplied toozYmissing meta-data: either (author and author_email) or (maintainer and maintainer_email) zimissing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied)distributionr" hasattrgetattrr r/ joinZauthorZauthor_emailZ
maintainerZmaintainer_email)r r" Zmissingattrr r r r1 P s$
zcheck.check_metadatac C s\ | j j }xL| j|D ]>}|d jd}|d kr:|d }nd|d |f }| j| qW d S )Nr+ linez%s (line %s))r8 Zget_long_description_check_rst_datagetr/ )r dataZwarningr= r r r r3 n s
zcheck.check_restructuredtextc C s t }t }tjtfdj }d|_d |_d |_t||j |j
|j|j|j
|jd}tj|||d}|j|d y|j|| W n: tk
r } z|jjd d| di f W Y d d }~X nX |jS )
N)Z
components )r r r r )r r+ z!Could not finish the parsing: %s. r> r> )r r r ZOptionParserZget_default_valuesZ tab_widthZpep_referencesZrfc_referencesr r r Zwarning_streamr Zerror_encodingZerror_encoding_error_handlerr documentZnote_sourceparseAttributeErrorr r )r rA source_pathparserZsettingsZreporterrD er r r r? y s*
$zcheck._check_rst_dataN)r" r# r$ )r% r&