관리-도구
편집 파일: lua.cpython-38.pyc
U ,�e� � @ 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 lmZ d d lmZ dZe jZe jZe jZdd �dd�Zddd�dd�Zejdddd�dd��Zddddd�dd�ZdS )� )�annotationsN)� Generator)�Sequence)� lang_base)� envcontext)�PatchesT)�Var)�Prefix)� cmd_outputZlua_env�str)�returnc C s t ddd�\} }} |�� S )z'Get the Lua version used in file paths.�luarocks�configz --lua-ver)r �strip)�_�stdout� r �F/opt/hc_python/lib/python3.8/site-packages/pre_commit/languages/lua.py�_get_lua_version s r r )�dr c C s� t � }tjdkrdnd}dtj�| d�tjtd�ffdtj�| dd|d �tj�| dd|d d�ffdtj�| d d|d|� d��fffS )N�win32Zdll�so�PATH�binZLUA_PATH�share�luaz?.lua;�?z init.lua;;Z LUA_CPATH�libz?.z;;)r �sys�platform�os�path�join�pathsepr )r �versionZso_extr r r � get_env_patch s ����r% r zGenerator[(None, None, None)])�prefixr$ r c c s0 t �| t|�}tt|��� d V W 5 Q R X d S )N)r �environment_dir�ENVIRONMENT_DIRr r% )r&