Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide separate wheels built with Lua and LuaJIT #104

Closed
tastyminerals opened this issue Sep 17, 2018 · 5 comments
Closed

Provide separate wheels built with Lua and LuaJIT #104

tastyminerals opened this issue Sep 17, 2018 · 5 comments

Comments

@tastyminerals
Copy link

I have a piece of code that I run with lupa:

from lupa import LuaRuntime
lua = LuaRuntime()

lua_code = """
function (size)
    print(_VERSION, (jit and jit.version or 'no jit'))
end
"""

It reports
Lua 5.3 no jit

How can I make lupa use luajit instead of Lua 5.3?

I have installed lupa via pip install lupa. I have installed both Lua 5.1, 5.2, 5.3 and luajit packages.

@scoder
Copy link
Owner

scoder commented Sep 17, 2018

The PyPI wheels are statically built, meaning, they include their own version of Lua. It's probably a good idea to build multiple PyPI packages, one with Lua, one with LuaJIT, and one that is dynamically built. Help with that is welcome.

@tastyminerals
Copy link
Author

tastyminerals commented Sep 17, 2018

I see. I have cloned your repo and built lupa from current branch using python setup.py install.
The setup.py successfully found luajit. Running the above code produced Lua 5.1 LuaJIT 2.0.5.
So, I guess it makes sense to just build and install lupa via setup.py rather than pulling the PyPI package which comes with Lua 5.3 and does not add that much of a speed gain.

@jbinary
Copy link
Contributor

jbinary commented Sep 17, 2018

You can still use pip too with --no-binary lupa flag

@Andril216
Copy link

@tastyminerals can you tell me how exactly you built it from the repo ?

@scoder scoder changed the title How to make lupa use luajit? Provide separate wheels built with Lua and LuaJIT Nov 17, 2020
@scoder
Copy link
Owner

scoder commented Feb 23, 2022

Superseded by #196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants