File: //usr/local/lib/python3.10/dist-packages/setuptools/command/__pycache__/dist_info.cpython-310.pyc
o
��hz
� @ s� d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ
d d
lmZ ddlmZ ddlmZ G d
d� de�ZdS )zD
Create a dist_info directory
As defined in the wheel specification
� N)�contextmanager)�Path)�cast� )�_normalization)�rmdir� )�egg_info)�log)�Commandc @ s^ e Zd ZdZdZg d�ZddgZddiZdd� Zddd�Z e
d
edefdd��Z
ddd�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 C s( d | _ d | _d | _d | _d | _d| _d S )NF)�
output_dir�name�
dist_info_dir�tag_date� tag_build�
keep_egg_info)�self� r �G/usr/local/lib/python3.10/dist-packages/setuptools/command/dist_info.py�initialize_options, s
zdist_info.initialize_options�returnNc C s� | j }|jptj}t| jp|�| _tt| �d��}t | j�|_
| jr'| j|_n|j| _| jr3| j|_n|j| _|�
� || _t�|�� �}t�|�� �}|� d|� �| _tj�| 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 �versionr r r r( 4 s"