관리-도구
편집 파일: interpreters.cpython-37.pyc
B �v6d� � @ s� d dl mZ d dl mZ d dl mZ d dlZd dlZd dlmZ d dlm Z m Z dZdZd Z G d d� de�Zddd �Zdd� ZdS )� )�print_function)�division)�absolute_importN)�ClSelectExcept)�check_output�demotez/opt/alt�rubyz??c @ s( e Zd Zddd�Zdd� Zd dd�ZdS ) �InterpreterNc C sr || _ |r|r|| _|| _n�|rj|| _tj�| jdd�}tj�|�rTtj�|�sT|}|sbt� d��|| _n\|r�|| _tj� tj�tj�|�tjj��| _n,t d�d }|j| _|j| _|j| _|j| _|r�|| _nd | _|r�|| _nfy4| j �rt| jddt| j �d�}nt| jdd�}W n& ttjfk �r> t� d ��Y nX |�� | _| j�snd �| j�d �d d� �| _d S )N�binr zCan not find ruby binary�versionz2.1z-ezputs RUBY_VERSION)� preexec_fnz"Error checking ruby binary version�.� )�user�prefix�binary�os�path�join�isfile�islinkr �InterpreterError�abspath�dirname�pardir�interpretersr �version_fullr r �OSError�ExternalProgramFailed�strip�split) �selfr r r r �target_userZruby_bin�interpreter�version_raw� r% �S/opt/alt/python37/lib/python3.7/site-packages/clselect/clselectruby/interpreters.py�__init__ sL zInterpreter.__init__c C s$ d| j j| j j| j| j| j| jf S )Nz@%s.%s(prefix='%s', version='%s', binary='%s', version_full='%s'))� __class__� __module__�__name__r r r r )r! r% r% r&