add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
�

�Wc�csz�ddlmZddlmZddlmZGd�d�ZGd�d�Zdd
�ZGd�d�Z	d
�Z
dS)i)�suppress)�
TextIOWrapper�)�abccs$�eZdZdZd�fd�Zd�ZdS)�SpecLoaderAdapterz>
    Adapt a package spec to adapt the underlying loader.
    c��|jS�N)�loader��spec� �6/usr/lib64/python3.12/importlib/resources/_adapters.pyz<lambda>zSpecLoaderAdapter.<lambda>s
��$�+�+��cs0�||_||�|_dSr)r	r)�selfr	Zadapter�   r�__init__zSpecLoaderAdapter.__init__s����	��g�d�m����rc�2�t|j|�Sr)�getattrr	�r
�name�  r�__getattr__zSpecLoaderAdapter.__getattr__s���t�y�y�$�'�'rN)�__name__�
__module__�__qualname__�__doc__rr�rrrrsI��������&>�%=�$�$�$�$�(�(�(�(�(rrcs�eZdZdZd�Zd�ZdS)�TraversableResourcesLoaderz9
    Adapt a loader to provide TraversableResources.
    c��||_dSrr�r
r	rrrz#TraversableResourcesLoader.__init__�
����	�	�	rcsN�t|j�j�Sr)�CompatibilityFilesr	�_nativerrr�get_resource_readerz.TraversableResourcesLoader.get_resource_readers��!�$�)�)�,�4�4�6�6rN)rrrrrr!rrrrrs<�����������7�7�7�7�7rr�rcs`�|dkrt|g|�Ri|��S|dkr|Std|�d���)Nr"ZrbzInvalid mode value 'z"', only 'r' and 'rb' are supported)r�
ValueError)Zfile�mode�args�kwargs�    r�_io_wrapperr( sR���s�{�{��T�3�D�3�3�3�F�3�3�3�	
������
�G�t�G�G�G��rcs��eZdZdZGd�dej
�ZGd�dej
�ZGd�dej
�Zd�Z	e
d	��Zd
�Zd�Z
d�Zd
S)rzj
    Adapter for an existing or non-existent resource reader
    to provide a compatibility .files().
    c�H�eZdZdZd�Zd�Zd�ZeZd�Ze	d��Z
d
d�Zd	S)�CompatibilityFiles.SpecPathzk
        Path tied to a module spec.
        Can be read and exposes the resource reader children.
        c�"�||_||_dSr)�_spec�_reader)r
r	�readerrrrz$CompatibilityFiles.SpecPath.__init__6s���D�J�!�D�L�L�Lrcs����js
td�St�fd��jj�D��S)Nrc3s^�K�|]&}tj�j|����(dSr)r�	ChildPathr-)Z.0Zpathr
s  �rz	<genexpr>z6CompatibilityFiles.SpecPath.iterdir.<locals>.<genexpr>=s@��������#�,�,�T�\�\�4�@�@�@�@�@��r)r-�iterZcontents�r
s`r�iterdirz#CompatibilityFiles.SpecPath.iterdir:sP����<�<�<��B�x������� �L�L�1�1�3����
rc��dS�NFrr1r
r�is_filez#CompatibilityFiles.SpecPath.is_fileB����5rcs��|jstj|�Stj|j|�Sr)r-r�
OrphanPathr/�r
Zotherrr�joinpathz$CompatibilityFiles.SpecPath.joinpathGs3���<�<�<�)�4�4�U�;�;�%�/�/����e�D�Drcs.�|jjSr)r,rr1r
rrz CompatibilityFiles.SpecPath.nameLs���:�:�?�?�"rr"csX�t|jjd�|g|�Ri|��Sr)r(r-�
open_resource�r
r$r%r&r'r�openz CompatibilityFiles.SpecPath.openPs2���t�|�|�9�9�$�?��W��W�W�W�PV�W�W�WrN�r"�rrrrrr2r5�is_dirr9�propertyrr<rrr�SpecPathr*0s�������	�	�
	"�	"�	"�	�	�	�	�	�	���	E�	E�	E�

�	#�	#�
�	#�	X�	X�	X�	X�	X�	XrrAcsJ�eZdZdZd�Zd�Zd�Zd�Zd�Ze	d��Z
dd	�Zd
S)�CompatibilityFiles.ChildPathzw
        Path tied to a resource reader child.
        Can be read but doesn't expose any meaningful children.
        cr+r)r-�_name)r
r.rrrrz%CompatibilityFiles.ChildPath.__init__Ys��!�D�L��D�J�J�Jrc��td�S�Nr�r0r1r
rr2z$CompatibilityFiles.ChildPath.iterdir]�����8�OrcsN�|jj|j�Sr)r-Zis_resourcerr1r
rr5z$CompatibilityFiles.ChildPath.is_file`s���<�<�+�+�D�I�I�6�6rcs&�|j�Sr)r5r1r
rr?z#CompatibilityFiles.ChildPath.is_dircs���|�|�~�%�%rcsF�tj|j|�Sr)rr7rr8rrr9z%CompatibilityFiles.ChildPath.joinpathfs��%�0�0����E�B�Brcrr)rCr1r
rrz!CompatibilityFiles.ChildPath.nameis���:�:�rr"csl�t|jj|j�|g|�Ri|��Sr)r(r-r:rr;r'rr<z!CompatibilityFiles.ChildPath.openmsF������*�*�4�9�9�5�t��>B����FL���
rNr=r>rrrr/rBSs�������	�	�
	�	�	�	�	�	�	7�	7�	7�	&�	&�	&�	C�	C�	C�
�	�	�
�	�	�	�	�	�	�	rr/cr))�CompatibilityFiles.OrphanPathz�
        Orphan path, not tied to a module spec or resource reader.
        Can't be read and doesn't expose any meaningful children.
        csP�t|�dkr
td��||_dS)Nrz/Need at least one path part to construct a path)Zlenr#�_path)r
Z
path_partsrrrz&CompatibilityFiles.OrphanPath.__init__xs(���:���"�"� �!R�S�S�#�D�J�J�JrcrDrErFr1r
rr2z%CompatibilityFiles.OrphanPath.iterdir}rGrcr3r4rr1r
rr5z%CompatibilityFiles.OrphanPath.is_file�r6rcsF�tjg|j�|�R�Sr)rr7rIr8rrr9z&CompatibilityFiles.OrphanPath.joinpath�s%��%�0�0�D�$�*�*�D�e�D�D�D�Drcs&�|jdS)Ni����)rIr1r
rrz"CompatibilityFiles.OrphanPath.name�s���:�:�b�>�!rr"cs�td��)NzCan't open orphan path)ZFileNotFoundErrorr;r'rr<z"CompatibilityFiles.OrphanPath.open�s��#�$<�=�=rNr=r>rrrr7rHrs�������	�	�
	$�	$�	$�
	�	�	�	�	�	���	E�	E�	E�
�	"�	"�
�	"�	>�	>�	>�	>�	>�	>rr7crrrrrrrzCompatibilityFiles.__init__�rrcs��tt�5|jjj	|jj
�cddd�S#1swYdSxYwr)rZAttributeErrorr	rr!rr1r
rr-zCompatibilityFiles._reader�s���
�n�
%�	H�	H��9�9�#�#�7�7��	�	���G�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H�	H���s�:A�A"cs>�|j}t|d�r|S|S)zB
        Return the native reader if it supports files().
        �files)r-Zhasattr)r
r.rrr zCompatibilityFiles._native�s$������ ���1�1�v�;�t�;rcrr)rr-)r
ZattrrrrzCompatibilityFiles.__getattr__�s���t�|�|�T�*�*rcsZ�tj|j|j�Sr)rrAr	r-r1r
rrJzCompatibilityFiles.files�s��!�*�*�4�9�9�d�l�l�C�CrN)rrrrrZTraversablerAr/r7rr@r-r rrJrrrrr*s���������
!X�!X�!X�!X�!X�3�?�?�!X�!X�F�����C�O�O���>>�>�>�>�>�S�_�_�>�>�:����H�H��H�<�<�<�+�+�+�D�D�D�D�Drrcs<�t|jt�S)z`
    Construct a package spec with traversable compatibility
    on the spec/loader/reader.
    )rZ__spec__r)Zpackager
r�	wrap_specrK�s��
�W�-�-�/I�J�JrNr=)Z
contextlibrZiorZrrrr(rrKrrr�<module>rLs���������������������
(�
(�
(�
(�
(�
(�
(�	7�	7�	7�	7�	7�	7�	7�����xD�xD�xD�xD�xD�xD�xD�vK�K�K�K�Kr