%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/setuptools/_distutils/command/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/setuptools/_distutils/command/__pycache__/upload.cpython-312.pyc

�


_�dC����dZddlZddlZddlZddlZddlmZddlmZm	Z	m
Z
ddlmZddl
mZmZddlmZdd	lmZeed
d�eedd�eedd�d
�ZGd�de�Zy)zm
distutils.command.upload

Implements the Distutils 'upload' subcommand (upload package to a package
index).
�N)�standard_b64encode)�urlopen�Request�	HTTPError)�urlparse�)�DistutilsError�DistutilsOptionError)�
PyPIRCCommand)�spawn�md5�sha256�blake2b)�
md5_digest�
sha256_digest�blake2_256_digestc�j�eZdZdZej
ddgzZejdgzZd�Zd�Zd�Z	d�Z
y	)
�uploadzupload binary package to PyPI)�sign�szsign files to upload using gpg)z	identity=�izGPG identity used to sign filesrc�t�tj|�d|_d|_d|_d|_d|_y)N�rF)r�initialize_options�username�password�
show_responser�identity)�selfs �F/usr/lib/python3/dist-packages/setuptools/_distutils/command/upload.pyrzupload.initialize_options's4���(�(��.���
���
������	���
�c�l�tj|�|jr|jst	d��|j�}|ik7r(|d|_|d|_|d|_|d|_	|js3|jjr|jj|_yyy)Nz.Must use --sign for --identity to have meaningrr�
repository�realm)r�finalize_optionsrrr
�_read_pypircrrr#r$�distribution)r�configs  r r%zupload.finalize_options/s����&�&�t�,��=�=����&�'W�X�X��"�"�$���R�<�"�:�.�D�M�"�:�.�D�M�$�\�2�D�O����D�J��}�}��!2�!2�!;�!;� �-�-�6�6�D�M�"<�}r!c��|jjs
d}t|��|jjD]\}}}|j|||��y)NzHMust create and upload files in one command (e.g. setup.py sdist upload))r'�
dist_filesr
�upload_file)r�msg�command�	pyversion�filenames     r �runz
upload.run?s\��� � �+�+�/�
�'�s�+�+�,0�,=�,=�,H�,H�	;�(�G�Y�����W�i��:�	;r!c���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�||<�$|jrMt|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_�}d0ja||j�}|jc|tdjf�d1|zt[ti|��|d2�}tk|j||�3�}	tm|�}|jo�}|jp}|d4k(r�|jcd5ja||�tdjf�|jzrF|j}�}!d6jd7|!d7f�}|jc|tdjf�yyd8ja||�}|jc|tdjx�t�|��#|j�wxYw#tB$rY��YwxYw#1swY���xYw#tr$r#} | jt}| jp}Yd} ~ ��d} ~ wtv$r/} |jct[| �tdjx��d} ~ wwxYw)9NzIncompatible url %s)�http�httpszunsupported schema �gpgz
--detach-signz-az--local-userr)�dry_run�rbz:action�file_upload�protocol_version�1�name�version�content�filetyper.�metadata_versionz1.0�summary�	home_page�author�author_email�license�description�keywords�platform�classifiers)�download_url�provides�requires�	obsoletesr�commentz.asc�
gpg_signature�:�asciizBasic z3--------------GHSKFJDLGDS7543FJKLFHRE75642756743254s
--s--
z+
Content-Disposition: form-data; name="%s"z; filename="%s"r�zutf-8s

zSubmitting {} to {}z multipart/form-data; boundary=%s)zContent-typezContent-length�
Authorization)�data�headers��zServer response ({}): {}�
zK---------------------------------------------------------------------------zUpload failed ({}): {})Arr#�AssertionErrorrrrr5�open�read�closer'�metadata�get_name�get_version�os�path�basename�get_description�get_url�get_contact�get_contact_email�get_licence�get_long_description�get_keywords�
get_platforms�get_classifiers�get_download_url�get_provides�get_requires�
get_obsoletes�_FILE_CONTENT_DIGESTS�items�	hexdigest�
ValueErrorrr�encoder�decode�io�BytesIO�
isinstance�list�type�tuple�str�write�getvalue�format�announce�logging�INFO�lenrr�getcoder,r�code�OSError�ERRORr�_read_pypi_response�joinr	)"rr-r.r/�schema�netloc�url�params�query�	fragments�gpg_args�fr<�metarR�digest_name�digest_cons�	user_pass�auth�boundary�sep_boundary�end_boundary�body�key�value�titler,rS�request�result�status�reason�e�texts"                                  r r+zupload.upload_fileIs���8@����8Q�5����V�U�I��U�i� �!6����!H�I�I��*�*� �!6��!?�@�@��9�9����h�?�H��}�}�!/���� ?���1�
��(�D�L�L�1�
��4� ��	��f�f�h�G�
�G�G�I�� � �)�)��
��}�
�
��
�

�D�M�M�O�
�
�t�'�'�)�

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

X�
X��`�	��V�V�F��U�U�F���	��M�M�#�a�&�'�-�-�0���	�sN� U�&U)�6U9�('V�U&�)	U6�5U6�9V�	W(�V-�-W(�9*W#�#W(N)�__name__�
__module__�__qualname__rDr�user_options�boolean_optionsrr%r0r+�r!r rrsK��1�K� �-�-�7�=�1��L�
$�3�3�v�h�>�O��7� ;�E&r!r)�__doc__r]rs�hashlibr~�base64r�urllib.requestrrr�urllib.parser�errorsr	r
�corerr�getattrrmrr�r!r �<module>r�si���
�	���%�6�6�!�9� ���'�5�$�/��W�h��5� ��)�T�:���q&�]�q&r!

Zerion Mini Shell 1.0