From fdd10248333fdbc7b51c19fc691d16aef2f46387 Mon Sep 17 00:00:00 2001 From: Peter Melnichenko Date: Tue, 7 Aug 2018 12:41:14 +0300 Subject: [PATCH] Fix ./?/init.lua not being in package path for Lua 5.3+ --- hererocks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hererocks.py b/hererocks.py index 8d0bb9c..22baefa 100755 --- a/hererocks.py +++ b/hererocks.py @@ -691,6 +691,10 @@ class Lua(Program): os.path.join(module_path, "?", "init.lua") ] module_path_parts.insert(0 if local_paths_first else 2, os.path.join(".", "?.lua")) + + if self.major_version in ["5.3", "5.4"]: + module_path_parts.append(os.path.join(".", "?", "init.lua")) + self.package_path = ";".join(module_path_parts) cmodule_path = os.path.join(opts.location, "lib", "lua", self.major_version)