Skip to content

Commit

Permalink
Add support for Lua 5.4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed Jun 29, 2024
1 parent ec640f2 commit 8bd2fcf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Lua and LuaJIT have some flags that add compatibility with other Lua versions. L
Installing standard PUC-Rio Lua
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Available versions: 5.1 - 5.1.5, 5.2.0 - 5.2.4, 5.3.0 - 5.3.6, 5.4.0 - 5.4.6. ``latest`` and ``^`` version aliases point to ``5.4.6``.
Available versions: 5.1 - 5.1.5, 5.2.0 - 5.2.4, 5.3.0 - 5.3.6, 5.4.0 - 5.4.7. ``latest`` and ``^`` version aliases point to ``5.4.7``.

Use ``5.1.0`` to install Lua ``5.1`` which was released without patch version for some reason.

Expand Down
15 changes: 8 additions & 7 deletions hererocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,17 +909,17 @@ class RioLua(Lua):
"5.1", "5.1.1", "5.1.2", "5.1.3", "5.1.4", "5.1.5",
"5.2.0", "5.2.1", "5.2.2", "5.2.3", "5.2.4",
"5.3.0", "5.3.1", "5.3.2", "5.3.3", "5.3.4", "5.3.5", "5.3.6",
"5.4.0", "5.4.1", "5.4.2", "5.4.3", "5.4.4", "5.4.5", "5.4.6"
"5.4.0", "5.4.1", "5.4.2", "5.4.3", "5.4.4", "5.4.5", "5.4.6", "5.4.7"
]
translations = {
"5": "5.4.1",
"5": "5.4.7",
"5.1": "5.1.5",
"5.1.0": "5.1",
"5.2": "5.2.4",
"5.3": "5.3.6",
"5.4": "5.4.6",
"^": "5.4.6",
"latest": "5.4.6"
"5.4": "5.4.7",
"^": "5.4.7",
"latest": "5.4.7"
}
checksums = {
"lua-5.1.tar.gz" : "7f5bb9061eb3b9ba1e406a5aa68001a66cb82bac95748839dc02dd10048472c1",
Expand Down Expand Up @@ -947,6 +947,7 @@ class RioLua(Lua):
"lua-5.4.4.tar.gz" : "164c7849653b80ae67bec4b7473b884bf5cc8d2dca05653475ec2ed27b9ebf61",
"lua-5.4.5.tar.gz" : "59df426a3d50ea535a460a452315c4c0d4e1121ba72ff0bdde58c2ef31d6f444",
"lua-5.4.6.tar.gz" : "7d5ea1b9cb6aa0b59ca3dde1c6adcb57ef83a1ba8e5432c0ecd06bf439b3ad88",
"lua-5.4.7.tar.gz" : "9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30",
}
all_patches = {
"When loading a file, Lua may call the reader function again after it returned end of input": """
Expand Down Expand Up @@ -2959,8 +2960,8 @@ def main(argv=None):
parser.add_argument(
"-l", "--lua", help="Version of standard PUC-Rio Lua to install. "
"Version can be specified as a version number, e.g. 5.2 or 5.3.1. "
"Versions 5.1.0 - 5.4.6 are supported. "
"'latest' and '^' are aliases for 5.4.6. "
"Versions 5.1.0 - 5.4.7 are supported. "
"'latest' and '^' are aliases for 5.4.7. "
"If the argument contains '@', sources will be downloaded "
"from a git repo using URI before '@' and using part after '@' as git reference "
"to checkout, 'master' by default. "
Expand Down
6 changes: 3 additions & 3 deletions test/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def assertHererocksSuccess(self, args, expected_output_lines=None, location="her
def test_install_latest_lua_with_latest_luarocks(self):
self.assertHererocksSuccess(["--lua", "latest", "--luarocks", "latest"])
self.assertHererocksSuccess(["--show"], ["Programs installed in", "Compat: default"])
self.assertSuccess(["lua", "-v"], ["Lua 5.4.6"])
self.assertSuccess(["lua", "-v"], ["Lua 5.4.7"])

self.assertSuccess(["luarocks", "--version"])
self.assertSuccess(["luarocks", "make", os.path.join("test", "hererocks-test-scm-1.rockspec")])
Expand Down Expand Up @@ -222,11 +222,11 @@ def test_activate_posix_script_bash_posix_mode(self):

def test_install_lua_5_4_with_luarocks_3(self):
self.assertHererocksSuccess(["--lua", "5.4", "--luarocks", "3"])
self.assertHererocksSuccess(["--lua", "5.4.6", "--luarocks", "3"])
self.assertHererocksSuccess(["--lua", "5.4.7", "--luarocks", "3"])

if os.name == "nt":
self.assertHererocksSuccess(["--lua", "5.4", "--luarocks", "3", "--target", "vs"])
self.assertHererocksSuccess(["--lua", "5.4.6", "--luarocks", "3", "--target", "vs"])
self.assertHererocksSuccess(["--lua", "5.4.7", "--luarocks", "3", "--target", "vs"])

if __name__ == '__main__':
unittest.main(verbosity=2)

0 comments on commit 8bd2fcf

Please sign in to comment.