File: //usr/local/lib/python3.10/site-packages/setuptools/command/__pycache__/dist_info.cpython-310.pyc
o
��i� � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl
mZ ddlm
Z
ddlmZ ddlmZ dd lmZ G d
d� de
�Zded
efdd�Zded
efdd�Zdd� Zdd� ZdS )zD
Create a dist_info directory
As defined in the wheel specification
� N)�contextmanager)�cleandoc)�Path)�Command)�log)� packaging)�SetuptoolsDeprecationWarningc @ sV e Zd ZdZg d�ZddgZddiZdd� Zdd � Ze d
e
defdd
��Zdd� Z
dS )� dist_infozcreate a .dist-info directory))z egg-base=�ezjdirectory containing .egg-info directories (default: top of the source tree) DEPRECATED: use --output-dir.)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 C s. d | _ d | _d | _d | _d | _d | _d| _d S )NF)�egg_base�
output_dir�name�
dist_info_dir�tag_date� tag_build�
keep_egg_info)�self� r �G/usr/local/lib/python3.10/site-packages/setuptools/command/dist_info.py�initialize_options( s
zdist_info.initialize_optionsc C s� | j rd}t�|t� | j p| j| _| j}|jptj}t | jp |�| _| �
d�}t| j�|_ | jr6| j|_n|j| _| j
rB| j
|_
n|j
| _
|�� || _t|�� �}t|�� �}|� d|� �| _tj�| j| j� d��| _d S )NzA--egg-base is deprecated for dist_info command. Use --output-dir.�egg_info�-z
.dist-info)r �warnings�warnr r �distributionZsrc_root�os�curdirr Zreinitialize_command�strr r �finalize_optionsr �_safe�get_name�_version�get_versionr �path�joinr )r �msg�distZproject_dirr r �versionr r r r% 1 s*
zdist_info.finalize_options�dir_path�requires_bkpc
c sv � |r6|� d�}t |dd� t||ddd� zd V W t |dd� t�||� d S t |dd� t�||� w d V d S )Nz.__bkp__T)�
ignore_errors)�
dirs_exist_ok�symlinks)�_rm�_copy�shutil�move)r r/ r0 Zbkp_namer r r �_maybe_bkp_dirP s �
�
zdist_info._maybe_bkp_dirc C s� | j jddd� | j�� | jj}tj�|�sJ d��t�d� tj�
| j��� | �d�}| �
|| j�� |�|| j� W d � d S 1 sGw Y d S )NT)�parents�exist_okz&.egg-info dir should have been createdz
creating '{}'�bdist_wheel)r �mkdirr �runr"