Random changes

This commit is contained in:
mpeterv 2016-03-28 19:21:25 +03:00
parent 57a163fe07
commit 2c41a94fcd
2 changed files with 6 additions and 9 deletions

View File

@ -21,6 +21,6 @@ build_script: python hererocks.py here --%LUA% --luarocks ^^ --verbose
test_script: test_script:
- here\bin\lua -v - here\bin\lua -v
- here\LuaRocks\luarocks --version - 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\LuaRocks\luarocks install busted
- here\bin\busted --version - here\bin\busted --version

View File

@ -854,24 +854,21 @@ class LuaRocks(Program):
return False return False
def lua_version(self): 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)) lua_binary = os.path.join(opts.location, "bin", exe(lua))
if is_executable(lua_binary): if is_executable(lua_binary):
return get_output(lua_binary, "-e", "print(_VERSION:sub(5))") return get_output(lua_binary, "-e", "print(_VERSION:sub(5))")
sys.exit("Error: could not locate Lua binary") sys.exit("Error: could not locate Lua binary")
def luarocks_help(self):
return get_output("install.bat", "/?")
def build(self): def build(self):
self.fetch() self.fetch()
if self.win32_zip: if os.name == "nt":
print("Building and installing LuaRocks" + self.version_suffix) print("Building and installing LuaRocks" + self.version_suffix)
help_text = self.luarocks_help() help_text = get_output("install.bat", "/?")
args = [ args = [
"install.bat", "install.bat",
"/P", os.path.join(opts.location, "LuaRocks"), "/P", os.path.join(opts.location, "luarocks"),
"/LUA", opts.location, "/LUA", opts.location,
"/FORCECONFIG", "/FORCECONFIG",
] ]
@ -895,7 +892,7 @@ class LuaRocks(Program):
run("make", "build") run("make", "build")
def install(self): def install(self):
if not self.win32_zip: if os.name != "nt":
print("Installing LuaRocks" + self.version_suffix) print("Installing LuaRocks" + self.version_suffix)
run("make", "install") run("make", "install")