diff --git a/appveyor.yml b/appveyor.yml index 6ff66ca..7587885 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,6 +21,6 @@ build_script: python hererocks.py here --%LUA% --luarocks ^^ --verbose test_script: - here\bin\lua -v - here\LuaRocks\luarocks --version - - here\LuaROcks\luarocks install lua-term 0.3 + - here\LuaRocks\luarocks install lua-term 0.3 - here\LuaRocks\luarocks install busted - here\bin\busted --version diff --git a/hererocks.py b/hererocks.py index 8fc288d..8fc1a86 100755 --- a/hererocks.py +++ b/hererocks.py @@ -854,24 +854,21 @@ class LuaRocks(Program): return False def lua_version(self): - for lua in ("lua5.1", "lua", "luajit"): + for lua in ["lua5.1", "lua", "luajit"]: lua_binary = os.path.join(opts.location, "bin", exe(lua)) if is_executable(lua_binary): return get_output(lua_binary, "-e", "print(_VERSION:sub(5))") sys.exit("Error: could not locate Lua binary") - def luarocks_help(self): - return get_output("install.bat", "/?") - def build(self): self.fetch() - if self.win32_zip: + if os.name == "nt": print("Building and installing LuaRocks" + self.version_suffix) - help_text = self.luarocks_help() + help_text = get_output("install.bat", "/?") args = [ "install.bat", - "/P", os.path.join(opts.location, "LuaRocks"), + "/P", os.path.join(opts.location, "luarocks"), "/LUA", opts.location, "/FORCECONFIG", ] @@ -895,7 +892,7 @@ class LuaRocks(Program): run("make", "build") def install(self): - if not self.win32_zip: + if os.name != "nt": print("Installing LuaRocks" + self.version_suffix) run("make", "install")