�
�Wc� � �� � d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZm Z d dl
mZ d dlm
Z
mZ d dlmZ d dlmZ d d lmZ eed
d� eedd� eedd� d
�Z G d� de� ZdS )� N)�standard_b64encode)� HTTPError)�urlopen�Request)�urlparse)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn)�log�md5�sha256�blake2b)�
md5_digest�
sha256_digest�blake2_256_digestc �l � e Zd ZdZej
ddgz Zej dgz Zd� Zd� Zd� Z d� Z
d S )
�uploadzupload binary package to PyPI)�sign�szsign files to upload using gpg)z identity=�izGPG identity used to sign filesr c �z � t j | � d| _ d| _ d| _ d| _ d | _ d S )N� r F)r
�initialize_options�username�password�
show_responser �identity)�selfs �1/usr/lib64/python3.12/distutils/command/upload.pyr zupload.initialize_options* s; � ��(�(��.�.���
���
������ ���
�
�
� c � � t j | � | j r| j s
t d� �| j � }|i k r4|d | _ |d | _ |d | _ |d | _ | j s5| j j r| j j | _ d S d S d S )Nz.Must use --sign for --identity to have meaningr r �
repository�realm)r
�finalize_optionsr r r �_read_pypircr r r# r$ �distribution)r �configs r r% zupload.finalize_options2 s� � ��&�&�t�,�,��=�=�=�����&�@��
� �"�"�$���R�<�<�"�:�.�D�M�"�:�.�D�M�$�\�2�D�O����D�J� �}�}�}��!2�!2�!;�!;�!;� �-�-�6�6�D�M�M�M� "<�!;�}�}r! c � � | j j sd}t |� �| j j D ] \ }}}| j |||� �d S )NzHMust create and upload files in one command (e.g. setup.py sdist upload))r'