Closed ayushanand18 closed 2 years ago
If we move the build backend to Flit then that will help us reduce two dependencies, setuptools
and wheel
. Perhaps this issue might provide some insights
@ayushanand18 I'm OK with pyproject.toml
but I have to confess I usually prefer a, very weird mix, of a pyproject.toml just for the [build-system]
, then all the metadata in a setup.cfg
b/c that format is pep517/518 compliant but also more flexible and readable, and I keep a thin setup.py
with the name and setuptools-scm
version management.
Let me elaborate on the latter. Keeping the name in a setup.py
is mostly b/c of a bug in GitHub, we need it so GitHub can extra the metadata and the dependency graph. That is super important to figure out the reach of your package. See here the erddapy one as an example: https://github.com/ioos/erddapy/network/dependents
The version management with setuptools-scm, see https://github.com/ioos/erddapy/blob/main/setup.py#L7-L12 for an example, is super handy b/c we need only to create tags and everything else is automated.
I don't want to impose a workflow, just wanted to give my 2-cents here. If both you and @7yl4r agree go ahead with the pyproject.toml only approach, if you want to change I can help you out to adequate to my workflow.
Thank you so much @ocefpaf with your worthy advice! I actually didn't know all those specifics and after reading this I feel keeping all three of them would be a nice idea.
I'll gain inspiration from erddapy and update you if I am stuck anywhere. :)
So I am moving back to setuptools for the time being because we will be using setup.py and setup.cfg.
Python packaging can be a bit disappointing and I really wished we could use a single tool. Hopefully pyproject.toml + build will be it in the near future.
Python packaging can be a bit disappointing and I really wished we could use a single tool. Hopefully pyproject.toml + build will be it in the near future.
I feel like it's true for every technology, every few years it evolves so much that the thing which seemed to be the future after some years it would look as if obsolete. I personally feel to be going back to books every day :) the more I see things the more I realize I'll need to learn more. But it's a beautiful journey overall!
Update: I have updated the pyproject.toml
and added setup.py
and setup.cfg
. Please have a look and advise if I missed anything.
But it's a beautiful journey overall!
I like your enthusiasm in order to keep that, stay away from packaging ;-p
I like your enthusiasm in order to keep that stay away from packaging ;-p
That's been my strategy. :rofl:
Overview
This PR aims to migrate from
setup.py
topyproject.toml
. Trying to resolve #16.Notes for reviewers
I figured that some projects used only
pyproject.toml
and completely did away withsetup.py
/setup.cfg
. It seems setuptools doesn't yet support PEP 660 so building editable installs withpyproject.toml
alone will throw errors (as in workflow runs). So I have moved to Flit as the build backend. Please review the details in the TOML file and advise me if I should add or remove anything.