garvys-org / rustfst

Rust re-implementation of OpenFST - library for constructing, combining, optimizing, and searching weighted finite-state transducers (FSTs). A Python binding is also available.
https://docs.rs/rustfst
Other
144 stars 17 forks source link

Fix rustfst-python build in various ways to support Python 3.12 among other things #281

Open dhdaines opened 2 months ago

dhdaines commented 2 months ago

Fixes: #283

dhdaines commented 2 months ago

Will fix the Python tests, etc, shortly!

dhdaines commented 2 months ago

Seems to be good now! Obviously I can't entirely test the release workflow but I did get it to build all the wheels for Linux/MacOS and the source distribution (something you didn't have before).

dhdaines commented 2 months ago

Note also that your pylint configuration was way out of date which is why you had to pin an ancient version of pylint (which does not work with recent versions of Python). I have fixed this and unpinned the versions of everything, because personally I am philosophically opposed to that, but you could of course rerun pip-compile and bring back the requirements files ;-)

dhdaines commented 2 months ago

Another note: I kept the cibuildwheel configuration in .github/workflows/native.yml but it could be moved to pyproject.toml as well - this would make it easier to test cibuildwheel by running it locally.

dhdaines commented 2 months ago

Another note: the docstrings had many problems with more recent versions of mkdocstrings. Namely they need to have blank lines between sections since... a while ago, I guess. So I fixed that too. You could pull it out with commit https://github.com/garvys-org/rustfst/pull/281/commits/26638249120e37a2c7e72be5bfcfcccfd419d793 if you aren't ready for the rest of the PR.

See: https://mkdocstrings.github.io/griffe/reference/docstrings/#google-syntax

dhdaines commented 2 months ago

Alternately you could revert to the legacy mkdocstrings parser: https://mkdocstrings.github.io/python-legacy/