관리-도구
편집 파일: conda.cpython-38.pyc
U ,�eo � @ s d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ d dlm Z d dl mZ d dl mZ d dl m Z d d l mZ d d l mZ d dlmZ d dlmZ d Ze jZe jZe jZddd�dd�Zejdddd�dd��Zdd�dd�Zddddd�dd�ZdS ) � )�annotationsN)� Generator)�Sequence)� lang_base)� envcontext)�PatchesT)� SubstitutionT)�UNSET)�Var)�Prefix)�cmd_output_b�conda�strr )�env�returnc C s� t j�| d�t jtd�f}tjdkrd| t jf|�}t j�| d�t jf|�}t j�| dd�t jf|�}dtfdtfd| fd|ffS ) N�bin�PATH�win32�Scripts�LibraryZ PYTHONHOMEZVIRTUAL_ENVZCONDA_PREFIX)�os�path�join�pathsepr �sys�platformr )r r � r �H/opt/hc_python/lib/python3.8/site-packages/pre_commit/languages/conda.py� get_env_patch s �r r zGenerator[(None, None, None)])�prefix�versionr c c s0 t �| t|�}tt|��� d V W 5 Q R X d S )N)r �environment_dir�ENVIRONMENT_DIRr r )r r Zenvdirr r r �in_env+ s r# )r c C s( t j�d�rdS t j�d�r dS dS d S )NZPRE_COMMIT_USE_MICROMAMBAZ micromambaZPRE_COMMIT_USE_MAMBAZmambar )r �environ�getr r r r � _conda_exe2 s r&