Open hidwood opened 1 year ago
It seems that luajit is currently not working with windows as it is written. What worked for me was the following:
or (platform.startswith('win') and 'luajit' in os.path.basename(lua_bundle_path.rstrip(os.sep)))
or (get_machine() != "AMD64" and get_machine() != "x86_64" and 'luajit' in os.path.basename(lua_bundle_path.rstrip(os.sep)))
cd
to your directory and run python setup.py build_ext -i
This will include the luajit20 and luajit21 third-party folders to also build, leaving you with lua52,lua53,lua54,luajit20 and luajit21 modules.
If you additionally want to create a distribution and such, you may also have to mass replace the hard coded absolute paths "/home/runner/work/lupa/lupa/..." to "./lupa/..."
If someone gets this to work, I'd be happy to receive a PR.
Thank you, this appears to work. I suppose my question is then why Windows on x64 will not build unless the machine type is specifically not x64 or AMD64? One would think that it would, but I do not know enough about the wizardry that is going on to make a guess as to why it does not work by default. With the modified setup file, I was able to build successfully on Windows10 /11 and Ubuntu 22.04, both on x64. I was unable to test on a Mac, so that may or may not work. Are there any adverse effects of using this setup? Or could this possibly be integrated with a PR as it is?
This
issue occurs when building with the standard "setup.py build" command, as it completely skips checking and building LuaJit. It succeeds in building Lua51, Lua52, Lua53, and Lua54, and then skips both LuaJit20 and LuaJit21, despite being able to build them directly. After searching the setup.py, I found a comment that states:Couldn't get the Windows build to work. See