add-determinism 0.7.3

RPM buildroot helper to strip nondeterministic bits in files
Documentation
�

�Wc�cs��	ddlZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZddlm
Z
mZddlmZddlmZdd	lmZeed
d�eedd�eedd�d
�ZGd�de�ZdS)�N)�standard_b64encode)�	HTTPError)�urlopen�Request)�urlparse)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn)�logZmd5Zsha256Zblake2b)Z
md5_digestZ
sha256_digestZblake2_256_digestcsl�eZdZdZej
ddgzZejdgzZd�Zd�Zd�Z	d�Z
d	S)
�uploadzupload binary package to PyPI)�signZszsign files to upload using gpg)z	identity=ZizGPG identity used to sign filesrcsz�tj|�d|_d|_d|_d|_d|_dS)N�rF)r�initialize_options�username�password�
show_responser�identity)�selfs �1/usr/lib64/python3.12/distutils/command/upload.pyrzupload.initialize_options*s;���(�(��.�.���
���
������	���
�
�
�cs��tj|�|jr|js
t	d��|j�}|ikr4|d|_|d|_|d|_|d|_	|js5|jjr|jj|_dSdSdS)Nz.Must use --sign for --identity to have meaningrr�
repository�realm)r�finalize_optionsrrrZ_read_pypircrrrr�distribution)rZconfigs  rrzupload.finalize_options2s����&�&�t�,�,��=�=�=�����&�@��
��"�"�$���R�<�<�"�:�.�D�M�"�:�.�D�M�$�\�2�D�O����D�J��}�}�}��!2�!2�!;�!;�!;� �-�-�6�6�D�M�M�M�"<�!;�}�}rcs��|jjsd}t|��|jjD]\}}}|j|||��dS)NzHMust create and upload files in one command (e.g. setup.py sdist upload))rZ
dist_filesr�upload_file)r�msg�command�	pyversion�filenames     r�runz
upload.runDsj��� � �+�+�+�2�C�&�s�+�+�,0�,=�,=�,H�,H�	;�	;�(�G�Y�����W�i��:�:�:�	;�	;rcs^�t|j�\}}}}}}	|s|s|	rtd|jz��|dvrtd|z��|jr<ddd|g}
|jrd|jg|
ddt|
|j�	�t|d
�}	|j�}|j�|jj}
idd�d
d�d|
j��d|
j��dtjj!|�|f�d|�d|�dd�d|
j#��d|
j%��d|
j'��d|
j)��d|
j+��d|
j-��d|
j/��d|
j1��d|
j3��|
j5�|
j7�|
j9�|
j;�d��}d |d!<t<j?�D]$\}}|��		||�jA�||<�&|jrSt|d"zd
�5}tjj!|�d"z|j�f|d#<ddd�|jDd$z|jFzjId%�}d&tK|�jMd%�z}d'}d(|jId%�z}|d)z}tOjP�}|j?�D]�\}}d*|z}tS|tT�s|g}|D]�}tW|�tXur|d+|d,zz
}|d-}nt[|�jId.�}|j]|�|j]|jId.��|j]d/�|j]|�����|j]|�|j_�}d0|�d1|j��}|ja|tbjd�d2|zt[tg|��|d3�}ti|j||�4�}	tk|�}|jm�}|jn}|d5kr�|jad6|�d7|��tbjd�|jxrK|j{�}!d8j}d9|!d9f�}|ja|tbjd�dSdSd:|�d7|��}|ja|tbjv�t|��#|j�wxYw#tB$rY��xwxYw#1swY��xYw#tp$r#} | jr}| jn}Yd} ~ ��d} ~ wtt$r3} |jat[| �tbjv��d} ~ wwxYw);NzIncompatible url %s)ZhttpZhttpszunsupported schema Zgpgz
--detach-signz-az--local-useri)�dry_runZrbz:actionZfile_uploadZprotocol_versionZ1ZnameZversion�contentZfiletyperZmetadata_versionz1.0ZsummaryZ	home_pageZauthorZauthor_emailZlicense�descriptionZkeywordsZplatformZclassifiers)Zdownload_urlZprovidesZrequiresZ	obsoletesr
Zcommentz.ascZ
gpg_signaturez:ZasciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"rizutf-8s

zSubmitting z to z multipart/form-data; boundary=%s)zContent-typezContent-lengthZ
Authorization)�data�headersi�zServer response (z): z
zK---------------------------------------------------------------------------zUpload failed ()@rrZAssertionErrorrrr	r ZopenZreadZcloserZmetadataZget_nameZget_version�osZpathZbasenameZget_descriptionZget_urlZget_contactZget_contact_emailZget_licenceZget_long_descriptionZget_keywordsZ
get_platformsZget_classifiersZget_download_urlZget_providesZget_requiresZ
get_obsoletes�_FILE_CONTENT_DIGESTSZitemsZ	hexdigestZ
ValueErrorrrZencoderZdecode�ioZBytesIOZ
isinstanceZlistZtypeZtupleZstrZwriteZgetvalueZannouncer
ZINFOZlenrrZgetcoderrZcodeZOSErrorZERRORrZ_read_pypi_responseZjoinr)"rrrrZschemaZnetlocZurlZparamsZqueryZ	fragmentsZgpg_argsZfr!Zmetar#Zdigest_nameZdigest_consZ	user_passZauthZboundaryZsep_boundaryZend_boundaryZbodyZkeyZvalueZtitlerr$ZrequestZresultZstatusZreasonZeZtexts"                                  rrzupload.upload_fileLs���
�T�_�_�%�	6����V�U�I��6�U�U�i�i� �!6����!H�I�I��*�*�*� �!6��!?�@�@��9�9�9����h�?�H��}�}�}�!/���� ?���1�
��(��,�,�
(�
(�
(�

��$���	��f�f�h�G�
�G�G�I�I�� � �)�)����}��
���
�D�M�M�O�
�
�t�'�'�)��
����(�(��2�7�;��
���
���
��� 
�t�+�+�-�!�"
�����#�$
�d�&�&�(�%�&
�D�2�2�4�'�(
�t�'�'�)�)�*
�4�4�4�6�+�,
��)�)�+�-�.
��*�*�,�/�0
�4�/�/�1�1�2!�1�1�3��)�)�+��)�)�+��+�+�-�;����@��Y��)>�(C�(C�(E�	�	�$�K���"��
�$/�K��$8�$B�$B�$D��[�!�!�
�9�9�9��h��'��.�
3�!�)+���)9�)9�(�)C�f�)L�)*����)3��_�%�
3�
3�
3�
3�
3�
�]�]�S�(�4�=�=�8�@�@��I�	��,�Y�7�>�>�w�G�G��I�� �8�?�?�7�#;�;��#�i�/���z�z�|���*�*�,�	"�	"�J�C��C�c�I�E��e�T�*�*�����	
"�	
"����;�%�'�'��.��q��9�9�E�!�!�H�E�E���J�-�-�g�6�E��
�
�<�(�(��
�
�5�<�<��0�1�1��
�
�;�'�'��
�
�5�!�!�!�	
"�	
�
�
�<� � ��}�}����'/�x�x�����A���
�
�c�3�8�8�$�$�?��I�!�#�d�)�n�!�
�
���$�/�/��")�+�+��		��W�%�F��^�^�%�F��Z�Z�F��S�=�=��M�M�M������G��(�(�
$�
$��!�!�!��/�/��7���i�i��4�� :�;���
�
�c�3�8�8�,�,�,�,�"�!��/5�f�f�f�f�=�C��M�M�#�s�y�y�)�)� ��%�%��g
�G�G�I�I�I�I�I�I��V�
�
�
���
����

3�
3�
3�
3�
3�
3�
3�
3�
3�����d�	�	�	��V�V�F��U�U�F�F�F�F�F�F������	�	�	��M�M�#�a�&�#�)�)�,�,������	���sN�*V�V&�>9V7�(*W�V#�&
V4�3V4�7W�
X,�W,�,
X,�9.X'�'X,N)Z__name__Z
__module__Z__qualname__r"rZuser_optionsZboolean_optionsrrrr�rrrrs�������1�K� �-�-�	+�=�1
�
�L�$�3�3�v�h�>�O����7�7�7�$;�;�;�K&�K&�K&�K&�K&rr)r%r'ZhashlibZbase64rZurllib.errorrZurllib.requestrrZurllib.parserZdistutils.errorsrrZdistutils.corerZdistutils.spawnr	Z	distutilsr
Zgetattrr&rr(rr�<module>r)s4���
�	�	�	�	�	�	�	�����%�%�%�%�%�%�"�"�"�"�"�"�+�+�+�+�+�+�+�+�!�!�!�!�!�!�A�A�A�A�A�A�A�A�(�(�(�(�(�(�!�!�!�!�!�!��������'�'�5�$�/��W�W�h��5� ���)�T�:����y&�y&�y&�y&�y&�]�y&�y&�y&�y&r