관리-도구
편집 파일: pkgmanager.cpython-37.pyc
B �v6d( � @ sl d dl mZ d dl mZ d dl mZ d dlZd dlmZ ddlmZm Z m Z mZmZm Z G dd � d e�ZdS ) � )�print_function)�division)�absolute_importN)�BasePkgManager� )�scan_python_versions�is_major_version� CONFIG_DIR�create_config_dirs� ALT_NAMES�ALT_PYTHON_PREFIXc @ s� e Zd ZdZdd� ZeZdZeZ dZ d�ede de g�Zd�ed e de g�Z d d� Zdd � Zdd� Zdd� Zdd� Zdd� Zedd� �ZdS )� PkgManagerz� Class responsible for all interactions with Yum, python version installation/removal and gathering info about already installed versions c C s t � d S )N)r )�self� r �S/opt/alt/python37/lib/python3.7/site-packages/clselect/clselectpython/pkgmanager.py�_create_config_dirs s zPkgManager._create_config_dirsz)LANG=C yum --disableplugin=fastestmirror z!&>/var/log/cl-python-last-yum.log� z-y install z{} z -y remove c C s t � S )N)r )r r r r �_scan_interpreter_versions? s z%PkgManager._scan_interpreter_versionsc C s t d�|�dd�� S )Nz{}/.lock�.r )r �format�replace)r �versionr r r �_get_lock_file_pathB s zPkgManager._get_lock_file_pathc C s6 | � � }|s| �� dS t�d|�}dd� |D �}|S )a� Should return list of major versions available to install from currently enabled repos. Note, this can be an empty list if no NodeJS version has been released to repos yet or in case of network/repos/yum problem. OR None if our cache is updating right now because it was absent/outdated/corrupted/etc. :rtype: list | None Nzalt-python(\d+)c S s&