luigi icon indicating copy to clipboard operation
luigi copied to clipboard

Support for PEP 517/518 (pyproject.toml build-system)

Open starhel opened this issue 2 years ago • 0 comments

PEP 517/518 (as well as their successors) are widely adapted to the python ecosystem and have become standard in how Python distribution builds are declared and executed1. Because of the last pip deprecation (https://github.com/pypa/pip/issues/8559) I'm opening this issue.

I've made some tests and luigi could be easily refactored to setup.cfg + pyproject.toml2. Unfortunately, there are some issues to solve:

  • Moving all metadata to setup.cfg requires using importlib.metadata (or its backport) to generate luigi.__meta__. Backport is available from python 3.6, so I was forced to drop python 3.5 support (EOL Sep 2020).
  • I've never uploaded docs to readthedocs.io, so I don't know if the READTHEDOCS environment param is still used and necessary (as tox -e dev does not use it to locally build docs).

If you are ok with dropping support for pythons older than 3.6 and removing READTHEDOCS env param, I can prepare PR with all necessary changes. When all changes will be done, deploying new versions should also enforce building wheel distribution (it's a single step using build). If you want I could also prepare a GitHub Action workflow to publish packages to PyPI and GH releases based on pushing tags to the repository.

  1. More about avoiding setup.py: https://setuptools.pypa.io/en/latest/userguide/quickstart.html#setuppy-discouraged
  2. I'm aware that setuptools supports now also pyproject.toml configuration, but many features are still in the beta stage.

starhel avatar Jan 30 '23 18:01 starhel