Hacked By AnonymousFox
�
!�gN � �p � d dl mZ d dl mZ d dl mZ d dlZd dlZd dlmZ G d� de� � Z d
d�Z
d � ZdS )� )�print_function)�division)�absolute_importN)�ClSelectExceptc �* � e Zd Zdd�Zd� Zd� Zdd�ZdS )�InterpreterNc � � |�ddl m} |� � }|| _ | � � � | _ | j rd}nd}t
j � | j |d� � | _ t
j � | j � � st j d| j z � � �|| j d | _
dS ) z�
:param prefix: mandatory prefix for nodejs root
:param versions_info: optional precomputed dict with handy info
about versions
Nr ��scan_node_versions�binzusr/bin�nodezCannot find node binary: %s�full_version)�clselect.clselectnodejsr �prefix�_guess_version_by_prefix�is_venv�os�path�join�binary�isfiler �InterpreterError�version�version_full)�selfr �
versions_infor �folder_s �_/opt/cloudlinux/venv/lib64/python3.11/site-packages/clselect/clselectnodejsuser/interpreters.py�__init__zInterpreter.__init__ s� � � � �B�B�B�B�B�B�.�.�0�0�M���� �4�4�6�6���
�<� ��G�G��G��g�l�l�4�;���@�@����w�~�~�d�k�*�*� =� �1�-���;�=� =�
=� *�$�,�7��G����� c � � | j � d� � rd}d}nd}d}t j || j � � d | _ |S )Nz/opt/altFz/opt/alt/alt-nodejs(\d+)/rootTz.+/nodevenv/.+/(\d+)r )r �
startswith�re�findallr )r �venv�patterns r r z$Interpreter._guess_version_by_prefix1 sQ � � �;�!�!�*�-�-� .��D�6�G�G��D�-�G��z�'�4�;�7�7��:����r c �z � | j j �d| j j �d| j �d| j �d| j �d| j �d�S )N�.z (prefix='z', version='z', binary='z', version_full='z'))� __class__�
__module__�__name__r r r r )r s r �__repr__zInterpreter.__repr__>