관리-도구
편집 파일: install_scripts.cpython-37.pyc
B ��Re! � @ sd d dl mZ d dlm mZ d dlmZ d dlZd dl Z d dl mZmZm Z G dd� dej�ZdS )� )�logN)�DistutilsModuleError)�Distribution�PathMetadata�ensure_directoryc @ s* e Zd ZdZdd� Zdd� Zd dd�Zd S )�install_scriptsz;Do normal script install, plus any egg_info wrapper scriptsc C s t j�| � d| _d S )NF)�origr �initialize_options�no_ep)�self� r ��/builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/command/install_scripts.pyr s z"install_scripts.initialize_optionsc C s dd l m m} | �d� | jjr2tj�| � ng | _ | j rBd S | �d�}t|j t|j |j�|j|j�}| �d�}t|dd �}y| �d�}t|dd�}W n ttfk r� d}Y nX |j}|r�d}|j}|tjkr�|g}|�� }|j�� �|�} x$|�|| �� �D ]} | j| � �qW d S ) Nr �egg_info� build_scripts� executable� bdist_wininstZ_is_runningFz python.exe)�setuptools.command.easy_install�command�easy_install�run_command�distribution�scriptsr r �run�outfilesr �get_finalized_commandr Zegg_baser r �egg_nameZegg_version�getattr�ImportErrorr ZScriptWriterZWindowsScriptWriter�sysr �bestZcommand_spec_class� from_paramZget_argsZ as_header�write_script)r �eiZei_cmd�distZbs_cmdZ exec_paramZbw_cmdZ is_wininst�writer�cmd�argsr r r r s8 zinstall_scripts.run�tc G s� ddl m}m} t�d|| j� tj�| j|�}| j � |� |� }| js~t|� t |d| �} | �|� | �� ||d| � dS )z1Write an executable file to the scripts directoryr )�chmod� current_umaskzInstalling %s script to %s�wi� N)r r( r) r �infoZinstall_dir�os�path�joinr �append�dry_runr �open�write�close) r �script_name�contents�modeZignoredr( r) �target�mask�fr r r r! 7 s zinstall_scripts.write_scriptN)r'