관리-도구
편집 파일: python.cpython-311.pyc
� |�Cg? � � � d dl Z d dlmZ d dlmZmZmZ d dlmZ d dl m Z mZ d dlm Z mZ d dlmZ dd lmZ G d � de� � ZdS )� N)�Feature)�ExternalProgramFailed�get_passenger_package_name�is_litespeed_running)� get_ui_config)�CL_SELECTOR_BIN�MODULES_LOGS_DIR)�InstallationFailedException�PackageMissingError)�installed_interpreters_list� )�WizardInstallerc � � e Zd Zej � ed� � Zej Z d� Zd� Ze d� � � Zd� Zd� Zd� Zd� Zed � � � Zd S )�PythonInstallerz python.logc �$ � g }|D ]0}d|� dd� � z }|� |� � �1| j � dd� |� � � � | j |� dS # t $ r}t � � |�d}~ww xY w)zd Install given python versions :param versions: versions of python packages z alt-python�.� z/Try to install Python package with versions: %s�,N)�replace�append� app_logger�info�join�_install_groupsr r )�self�versions�groups�v�package_name�es �N/opt/cloudlinux/venv/lib64/python3.11/site-packages/clwizard/modules/python.py�_install_python_versionsz(PythonInstaller._install_python_versions s� � � ��� (� (�A�'�!�)�)�C��*<�*<�<�L��M�M�,�'�'�'�'�����N�PS�PX�PX�Ya�Pb�Pb�c�c�c� 7� �D� �&�)�)�)�)��$� 7� 7� 7�-�/�/�Q�6����� 7���s �% A1 �1 B�;B � Bc � � d}t j � |� � sdS | � d|g� � dS # t $ r}t � � |�d}~ww xY w)a In order to make python apps work on Litespeed server we need to do run extra script see docs for details: https://www.litespeedtech.com/support/wiki/doku.php/litespeed_wiki:cloudlinux:enable_passenger :return: z9/usr/local/lsws/admin/misc/enable_ruby_python_selector.shN�sh)�os�path�isfile�_run_commandr r )r �litespeed_scriptr s r! �_configure_for_litespeed_serverz/PythonInstaller._configure_for_litespeed_server'