관리-도구
편집 파일: interpreters.cpython-311.pyc
� %�4g� � � � d dl mZ d dl mZ d dl mZ d dlZd dlZd dlmZ d dlm Z m Z dZdZd Z G d � de� � Zdd�Zd � ZdS )� )�print_function)�division)�absolute_importN)�ClSelectExcept)�check_output�demotez/opt/alt�rubyz??c �( � e Zd Z dd�Zd� Zdd�ZdS )�InterpreterNc � � || _ |r|r|| _ || _ �nJ|r�|| _ t j � | j dd� � }t j � |� � r!t j � |� � s|}|st j d� � �|| _ n�|rv|| _ t j � t j � t j � |� � t j j � � � � | _ nEt d� � d }|j | _ |j | _ |j | _ |j | _ |r|| _ nd | _ |r|| _ n� | j r+t! | j ddt# | j � � �� � }nt! | j dd� � }n.# t$ t j f$ r t j d � � �w xY w|� � � | _ | j s<d � | j � d � � d d� � � | _ d S 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_user�ruby_bin�interpreter�version_raws �Y/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/clselectruby/interpreters.py�__init__zInterpreter.__init__ sS � ��� �� 9�f� 9� �D�K� �D�K�K� � 9� �D�K��w�|�|�D�K���?�?�H�����x�(�(� "������1I�1I� "�!��� 0�$�5�.�0� 0� 0� !�D�K�K� � 9� �D�K��'�/�/�"�'�,�,������'�'����+9� +9� :� :�D�K�K� '�y�1�1�%�8�K�%�,�D�K�%�,�D�K�&�.�D�L� +� 8�D��� �"�D�L�L��D�L�� 4� ,�D��� :��9� W�".�t�{�D�BU�:@���:K�:K�#M� #M� #M�K�K� #/�t�{�D�BU�"V�"V�K����^�A�B� :� :� :�$�5�8�:� :� :� :���� !,� 1� 1� 3� 3�D���|� F��8�8�D�$5�$;�$;�C�$@�$@��!��$D�E�E�D�L�L�L� F� Fs �AG �+G6c �z � | j j �d| j j �d| j �d| j �d| j �d| j �d�S )Nr z (prefix='z', version='z', binary='z', version_full='z'))� __class__� __module__�__name__r r r r )r$ s r) �__repr__zInterpreter.__repr__K sM � � ��)�)�)�4�>�+B�+B�+B�����T�\�\�\�4�;�;�;��8I�8I�8I� � � c �j � | j | j | j | j d�}|r||= t | |� � |iS |S )N)r r r r )r r r r �getattr)r$ �key�is r) �as_dictzInterpreter.as_dictS sN � ��k��k��|� �-� � �� � +��#���D�#�&�&��*�*��r0 )NNNNN�N)r. r- �__qualname__r* r/ r5 � r0 r) r r sV � � � � � �9=�04�0F� 0F� 0F� 0F�d� � � � � � � � r0 r c �N � � t j � t t t z � � }g }t j |� � D ]=} t |� � }n# t j $ r Y �$w xY w|� |� � �>� rt � fd�|D � � � � S |S )Nc 3 �<