add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
f

��_tc@sxdZddlZddlZejZddd�ZGdd�dej�ZGdd	�d	ej�ZGd
d�dej	�Z	Gdd
�d
ej
�Z
dd�ZdS)z� Python 'utf-16' Codec


Written by Marc-Andre Lemburg (mal@lemburg.com).

(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.

�N�strictcCst�||d�S)NT)�codecsZ
utf_16_decode)�input�errors�r�)/usr/lib64/python3.10/encodings/utf_16.py�decodesrc@s8eZdZddd�Zddd�Zdd�Zd	d
�Zdd�Zd
S)�IncrementalEncoderrcC�tj�||�d|_dS�N)rr�__init__�encoder��selfrrrrr�zIncrementalEncoder.__init__FcCsN|jdur<t�||j�d}tjdkr0tj|_ntj|_|S|�||j�dS)Nr�little)rr�
utf_16_encoder�sys�	byteorder�utf_16_le_encode�utf_16_be_encode)rr�final�resultrrr�encodes


zIncrementalEncoder.encodecC�tj�|�d|_dSr
)rr�resetr�rrrrr!�zIncrementalEncoder.resetcCs|jdurdSdS)N�r)rrrrr�getstate%szIncrementalEncoder.getstatecCs,|rd|_ntjdkr tj|_ntj|_dS�Nr)rrrrrr�r�staterrr�setstate,s


zIncrementalEncoder.setstateN�r)F)�__name__�
__module__�__qualname__rrrrr"rrrrrs



rc@s6eZdZd
dd�Zdd�Zdd�Zdd	�Zd
d�ZdS)�IncrementalDecoderrcCr	r
)r�BufferedIncrementalDecoderr�decoderr
rrrr6rzIncrementalDecoder.__init__cCsl|jdur\t�||d|�\}}}|dkr2tj|_n"|dkrDtj|_n|dkrTtd��||fS|�||j|�S)Nr������r�%UTF-16 stream does not start with BOM)r)r�utf_16_ex_decode�utf_16_le_decode�utf_16_be_decode�UnicodeErrorr)rrrrZoutput�consumedrrrr�_buffer_decode:s
�

z!IncrementalDecoder._buffer_decodecCrr
)rr(rr)rrrrrGrzIncrementalDecoder.resetcCsDtj�|�d}|jdur"|dfSttjdk|jtjuk�}||fS)Nrr�big)rr(rr)Zintrrr/)rr!ZaddstaterrrrKs


�zIncrementalDecoder.getstatecCsdtj�||�|d}|dkr8tjdkr.tjntj|_n(|dkrZtjdkrPtjntj|_nd|_dS)Nr+rr3)rr(r"rrr/r.r)r rrrr"Ys����zIncrementalDecoder.setstateNr#)r$r%r&rr2rrr"rrrrr'5s


r'c@s(eZdZd	dd�Zdd�Zd
dd�ZdS)�StreamWriterrcCstj�|||�d|_dSr
)rr4rr)rZstreamrrrrriszStreamWriter.__init__cCrr
)rr4rrrrrrrmrzStreamWriter.resetcCsB|jdur6t�||�}tjdkr*tj|_ntj|_|S|�||�Sr)rrrrrrr)rrrrrrrrqs


zStreamWriter.encodeNr#r#)r$r%r&rrrrrrrr4hs
r4c@seZdZdd�Zddd�ZdS)�StreamReadercCs,tj�|�z|`Wnty&Yn0dSr
)rr5rrZAttributeErrorrrrrr~s
zStreamReader.resetrcCsRt�||dd�\}}}|dkr(tj|_n"|dkr:tj|_n|dkrJtd��||fS)NrFr*r+rr,)rr-r.rr/r0)rrrZobjectr1rrrrr�s�

zStreamReader.decodeNr#)r$r%r&rrrrrrr5|sr5c	Cstjdttttttd�S)Nzutf-16)ZnamerrZincrementalencoderZincrementaldecoderZstreamreaderZstreamwriter)rZ	CodecInforrrr'r5r4rrrr�getregentry�s�r6r#)Z__doc__rrrrrrr(r'r4r5r6rrrrZ<module>s
#3