관리-도구
편집 파일: install_egg_info.cpython-37.pyc
B ��Re+ � @ sd d Z ddlmZ ddlmZmZ ddlZddlZddlZG dd� de�Z dd� Z d d � Zdd� ZdS ) z�distutils.command.install_egg_info Implements the Distutils 'install_egg_info' command, for installing a package's PKG-INFO metadata.� )�Command)�log�dir_utilNc @ s: e Zd ZdZdZdgZdd� Zdd� Zdd � Zd d� Z dS ) �install_egg_infoz)Install an .egg-info file for the packagez8Install package's PKG-INFO metadata as an .egg-info file)zinstall-dir=�dzdirectory to install toc C s d | _ d S )N)�install_dir)�self� r ��/builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/_distutils/command/install_egg_info.py�initialize_options s z#install_egg_info.initialize_optionsc C sb | � dd� dtt| j�� ��tt| j�� ��ftjd d� � }t j �| j|�| _ | j g| _d S )N�install_lib)r r z%s-%s-py%d.%d.egg-info� )�set_undefined_options�to_filename� safe_name�distribution�get_name�safe_version�get_version�sys�version_info�os�path�joinr �target�outputs)r �basenamer r r �finalize_options s z!install_egg_info.finalize_optionsc C s� | j }tj�|�r0tj�|�s0tj|| jd� nNtj�|�rV| � tj | j fd| � n(tj�| j�s~| � tj| jfd| j � t �d|� | js�t|ddd��}| jj�|� W d Q R X d S )N)�dry_runz Removing z Creating z Writing %s�wzUTF-8)�encoding)r r r �isdir�islinkr �remove_treer �exists�execute�unlinkr �makedirsr �info�openr �metadata�write_pkg_file)r r �fr r r �run s zinstall_egg_info.runc C s | j S )N)r )r r r r �get_outputs. s zinstall_egg_info.get_outputsN) �__name__� __module__�__qualname__�__doc__�description�user_optionsr r r- r. r r r r r s r c C s t �dd| �S )z�Convert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'. z[^A-Za-z0-9.]+�-)�re�sub)�namer r r r 6 s r c C s | � dd�} t�dd| �S )z�Convert an arbitrary string to a standard version string Spaces become dots, and all other non-alphanumeric characters become dashes, with runs of multiple dashes condensed to a single dash. � �.z[^A-Za-z0-9.]+r5 )�replacer6 r7 )�versionr r r r >