관리-도구
편집 파일: dist_info.cpython-311.pyc
� �܋f� � � � d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZ dd l mZ d dlmZ G d� d e� � Zd� ZdS )zD Create a dist_info directory As defined in the wheel specification � N)�contextmanager)�log)�Command)�Path)�cast� )�_normalization� )�egg_infoc �` � e Zd ZdZdZg d�ZddgZddiZd� Zd� Z e d ed efd�� � Z d� Zd S )� dist_infoz� This command is private and reserved for internal use of setuptools, users should rely on ``setuptools.build_meta`` APIs. z@DO NOT CALL DIRECTLY, INTERNAL ONLY: create .dist-info directory))zoutput-dir=�ozYdirectory inside of which the .dist-info will becreated [default: top of the source tree])�tag-date�dz0Add date stamp (e.g. 20050528) to version number)z tag-build=�bz-Specify explicit tag to add to version number)�no-date�Dz"Don't include date stamp [default])� keep-egg-infoNz,*TRANSITIONAL* will be removed in the futurer r r c �Z � d | _ d | _ d | _ d | _ d | _ d| _ d S )NF)� output_dir�name� dist_info_dir�tag_date� tag_build� keep_egg_info)�selfs �m/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/setuptools/command/dist_info.py�initialize_optionszdist_info.initialize_options* s4 � ������ �!����� ����"����� c � � | j }|j pt j }t | j p|� � | _ t t | � d� � � � }t | j � � |_ | j r | j |_ n|j | _ | j r | j |_ n|j | _ |� � � || _ t j |� � � � � }t j |� � � � � }|� d|� �| _ t j � | j | j � d�� � | _ d S )Nr �-z .dist-info)�distribution�src_root�os�curdirr r r �egg_info_cls�reinitialize_command�str�egg_baser r �finalize_optionsr r � safer_name�get_name�safer_best_effort_version�get_versionr �path�joinr )r �dist�project_dirr r �versions r r* zdist_info.finalize_options2 s, � �� ���m�0�r�y���t��=�+�>�>�����d�&?�&?� �&K�&K�L�L�����0�0����=� .� $� �H���$�-�D�M��>� 0�!%��H���%�/�D�N��!�!�#�#�#� �� ��(������9�9�� �:�4�;K�;K�;M�;M�N�N���'�'�g�'�'�� ��W�\�\�$�/�d�i�;S�;S�;S�T�T����r �dir_path�requires_bkpc # �" K � |r�|� d�}t |d�� � t j ||dd�� � d V � t |d�� � t j ||� � d S # t |d�� � t j ||� � w xY wd V � d S )Nz.__bkp__T)� ignore_errors)� dirs_exist_ok�symlinks)�_rm�shutil�copytree�move)r r4 r5 �bkp_names r �_maybe_bkp_dirzdist_info._maybe_bkp_dirL s� � � � �� �"�,�,�,�H����-�-�-�-��O�H�h�d�T�R�R�R�R� 0������H�D�1�1�1�1���H�h�/�/�/�/�/�� �H�D�1�1�1�1���H�h�/�/�/�/�����E�E�E�E�Es �A � (Bc �4 � | j � dd�� � | j � � � | j j }t j � |� � s J d� � �t j d� t j � | j � � � � � � | � d� � }| � || j � � 5 |� || j � � d d d � � d S # 1 swxY w Y d S )NT)�parents�exist_okz&.egg-info dir should have been createdz creating '{}'�bdist_wheel)r �mkdirr �runr$ r/ �isdirr �info�format�abspathr �get_finalized_commandr? r �egg2dist)r �egg_info_dirrC s r rE z dist_info.runZ sL � �����d�T��:�:�:�� �������}�-���w�}�}�\�*�*�T�T�,T�T�T�*����'�'������8J�(K�(K�L�L�M�M�M��0�0��?�?�� � � ��t�/A� B� B� C� C�� � ��t�/A�B�B�B� C� C� C� C� C� C� C� C� C� C� C� C���� C� C� C� C� C� Cs �$D � D�DN)�__name__� __module__�__qualname__�__doc__�description�user_options�boolean_options�negative_optr r* r r( �boolr? rE � r r r r s� � � � � � �� � U�K�� � �L� "�?�3�O��z�*�L�#� #� #�U� U� U�4 ��s� �$� � � � �^��C� C� C� C� Cr r c �l � t j � | � � rt j | fi |�� d S d S )N)r$ r/ rF r; �rmtree)�dir_name�optss r r: r: h s@ � � �w�}�}�X��� (�� �h�'�'�$�'�'�'�'�'�(� (r )rP r$ r; � contextlibr � distutilsr �distutils.corer �pathlibr �typingr � r r r&