From 4c08ec908bfaba35c6055ee273a0768ba6749089 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Mon, 20 Nov 2023 09:01:31 +0800 Subject: feat(tests): 实现对 `Lua5.4` 的封装 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/lua_in_python.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/lua_in_python.py b/tests/lua_in_python.py index eb609d4..34deaab 100644 --- a/tests/lua_in_python.py +++ b/tests/lua_in_python.py @@ -1,3 +1,12 @@ -import lupa +try: + import lupa.luajit2 as lupa +except ImportError: + try: + import lupa.lua54 as lupa + except ImportError: + try: + import lupa.lua53 as lupa + except ImportError: + import lupa print(f"Using {lupa.LuaRuntime().lua_implementation} (compiled with {lupa.LUA_VERSION})") \ No newline at end of file -- cgit v1.2.3-70-g09d2