add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
a

Z��^c@s�ddlmZddlmZzHddlmZddlmZddlm	Z	ddlm
Z
Gdd�de�Zd	ZWne
yvd
ZYn0Gdd�de�Zd
S)�)�Command)�DistutilsSetupError)�Reporter)�Parser)�frontend)�nodesc@seZdZd	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/lib64/python3.9/distutils/command/check.pyrs�zSilentReporter.__init__cOs8|j�||||f�tj|g|�R||j|d�|��S)N)�levelZtype)r�appendr�system_messageZlevels)r
rZmessageZchildrenZkwargsrrrrs���zSilentReporter.system_message)Nrrr	)�__name__�
__module__�__qualname__rrrrrrrs�
rTFc@sXeZdZdZgd�Zgd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�ZdS)�checkz"perform some checks on the package))�metadataZmzVerify meta-data)�restructuredtextZrzEChecks if long string meta-data syntax are reStructuredText-compliant)�strictZsz(Will exit with an error if a check fails)rrr cCsd|_d|_d|_d|_dS)Nr�)rrr �	_warnings�r
rrr�initialize_options0szcheck.initialize_optionscCsdSr
rr#rrr�finalize_options7szcheck.finalize_optionscCs|jd7_t�||�S)Nr!)r"r�warn)r
Zmsgrrrr&:sz
check.warncCsL|jr|��|jr0tr"|��n|jr0td��|jrH|jdkrHtd��dS)NzThe docutils package is needed.rzPlease correct your package.)r�check_metadatar�HAS_DOCUTILS�check_restructuredtextr rr"r#rrr�run?s
z	check.runcCs�|jj}g}dD]"}t||�r(t||�s|�|�q|rL|�dd�|��|jrd|js�|�d�n"|j	r||j
s�|�d�n
|�d�dS)N)ZnameZversionZurlzmissing 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 supplied)�distributionrZhasattrZgetattrrr&ZjoinZauthorZauthor_emailZ
maintainerZmaintainer_email)r
rZmissingZattrrrrr'Oszcheck.check_metadatacCsX|j��}|�|�D]>}|d�d�}|dur8|d}nd|d|f}|�|�qdS)N������liner!z%s (line %s))r+Zget_long_description�_check_rst_dataZgetr&)r
�dataZwarningr-rrrr)ps

zcheck.check_restructuredtextc
Cs�|jjp
d}t�}tjtfd���}d|_d|_d|_t	||j
|j|j|j
|j|jd�}tj|||d�}|�|d�z|�||�Wn<ty�}z$|j�dd|dif�WYd}~n
d}~00|jS)	Nzsetup.py)Z
componentsi)rrrr)rr,z!Could not finish the parsing: %s.Z)r+Zscript_namerrZOptionParserZget_default_valuesZ	tab_widthZpep_referencesZrfc_referencesrrrZwarning_streamrZerror_encodingZerror_encoding_error_handlerr�documentZnote_sourceZparseZAttributeErrorrr)r
r/Zsource_pathZparserZsettingsZreporterr0Zerrrr.{s.��zcheck._check_rst_dataN)
rrrZdescriptionZuser_optionsZboolean_optionsr$r%r&r*r'r)r.rrrrr#s!rN)Zdistutils.corerZdistutils.errorsrZdocutils.utilsrZdocutils.parsers.rstrZdocutilsrrrr(Z	ExceptionrrrrrZ<module>s