madmaze / pytesseract

A Python wrapper for Google Tesseract
Apache License 2.0
5.76k stars 715 forks source link

Migrate to pyproject.toml #531

Open egeakman opened 8 months ago

egeakman commented 8 months ago

Updates:

Ideas:

Here is an example project using hatchling and pyproject.toml.

To build:

python -m pip install build
python -m build

This builds a wheel and a tar under dist/, ready to ship.

egeakman commented 8 months ago

Ping @bozhodimitrov

stefan6419846 commented 8 months ago

Which advantages/disadvantages can be expected with this approach?

egeakman commented 8 months ago

Basically, pyproject.toml is the modern and standardized way for most Python packages.

Here are some more specific advantages and disadvantages of pyproject.toml:

Advantages:

Disadvantages:

See also: Simon Willison's blog post, PEP 517, PEP 518

egeakman commented 8 months ago

I'm more drawn to using hatchling these days. Here is an exhaustive answer to "Why Hatch?".

I can edit the PR to use hatchling instead of setuptools, just let me know.

egeakman commented 8 months ago

Kindly pinging again @stefan6419846. If this project needs more love, I'd be more than happy to help with basic maintenance/triage.

stefan6419846 commented 8 months ago

I have no strong opinion on the build tools itself - if you have a look at my own repositories, you will see that I still mostly use the traditional setuptools approach with setup.py, although with the latest commands. For this reason, I personally do not see the direct need to migrate anything here unless there are actual maintenance benefits.

Leaving this aside: I am just a contributor here, no maintainer/collaborator, thus I am not able to decide this anyway ;) I am sure that the maintainers come back to you once they find appropriate time.