Actions
Idea #20311
openUpdate Python packages to build with PEP 517/518
Start date:
Due date:
Story points:
-
Description
Assuming we want to continue to build with setuptools, this means converting our packages' current setup.py
to setup.cfg
, then adding a (boilerplate) setup.py
and pyproject.toml
to them.
Reasons to do this:
- Gives us the option to build packages using other systems in the future if we need or want that for any reason.
- In my experience, maintining
setup.cfg
is nicer thansetup.py
, since it's more declarative. - Some of the interfaces of
setup.py
are deprecated (I think we're already getting warnings about this), and this gives us a clear migration path off those too.
Background reading:
- PyPA documentation
- The PEPs
- Brett Cannon blogs: 1, 2
- Here's a commit of me converting a project at a previous job so you can see what it looks like in action
Related issues
Actions