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

Migrate to Lua 5.1 #36

Merged
merged 14 commits into from
May 12, 2023
Merged

Migrate to Lua 5.1 #36

merged 14 commits into from
May 12, 2023

Conversation

xxyzz
Copy link
Collaborator

@xxyzz xxyzz commented Apr 25, 2023

The changes include:

  • Migrate the legacy build script setup.py to pyproject.toml
  • Migrate Lua code to Lua 5.1.
  • Build lupa and lru-dict from source.

@xxyzz
Copy link
Collaborator Author

xxyzz commented Apr 26, 2023

I guess it's a bug in older pip but fixed in later versions that the lupa.lua51 module can't be found.

@kristian-clausal
Copy link
Collaborator

kristian-clausal commented Apr 27, 2023

Will be merged at the same time as tatuylonen/wiktextract#239, as long as scoder/lupa#238 is merged so that we don't have to deal with a temporary fork of lupa.

xxyzz added 12 commits May 10, 2023 11:05
Building package from setup.py is deprecated, pyproject.toml-based
build method(PEP 518) is prefered for modern packages.

Lupa patch: install Cython build dependency from setup.py
lru-dict patch: fix build error with llvm 16
Some tests are still failing
Luaa 5.1 doesn't call `__len` in the `#x` syntax.
Scribunto uses LuaSandbox which backports them to Lua 5.1.
`--use-pep517` option is required to install build dependencies for
Lupa.
@xxyzz
Copy link
Collaborator Author

xxyzz commented May 12, 2023

My Lupa pull request was merged, but now we have to use pip install --use-pep517 option to build Lupa from source.

@kristian-clausal
Copy link
Collaborator

Excellent! I have problems actually testing this without first merging it (because there are changes in both repos and if I try to pip install wiktextract it will just pull the old wiktextprocessor version because it hasn't been merged yet etc.) so I will merge now and if things don't work out, we can just revert the merges.

Today is Friday, so hopefully things work out and I don't get the usual "Kaikki.org failed to generate" e-mails on the weekend (as usually happens when any changes are made on a Friday).

@kristian-clausal kristian-clausal merged commit 2e60f3a into tatuylonen:main May 12, 2023
@xxyzz
Copy link
Collaborator Author

xxyzz commented May 12, 2023

Please don't forget to use the --use-pep517 pip install option. Should I create new pull request from the sqlite branches now?

@kristian-clausal
Copy link
Collaborator

I will edit the regeneration script in the kaikki webgen repository, thanks for the reminder.

Tested installing wiktextract locally, and everything seemed to install and tests passed, and the files in site-packages seem to be correct source files. I will test a couple of pages and maybe a small run, let's see how it goes.

@kristian-clausal
Copy link
Collaborator

Do you require --use-pep517 when installing wiktextract or wikitextprocessor? Not using or using it seems to result in the same installation. I think having --use-pep517 in the setup for just Lupa seems to work correctly.

@xxyzz
Copy link
Collaborator Author

xxyzz commented May 12, 2023

Without --use-pep517 pip will print some warning messages that suggest user to enable this option to install build dependency(Cython) when building Lupa from source. This option can be dropped once a new version of lupa is released. but before that happens it's better to use this option to make sure Lupa's build dependency will be installed.

@xxyzz xxyzz deleted the lua5.1 branch May 17, 2023 00:04
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

Successfully merging this pull request may close these issues.

2 participants