pyOpenSci / python-package-guide

scientific Python package recommendations & guidance curated by pyOpenSci
https://www.pyopensci.org/python-package-guide/
Other
93 stars 51 forks source link

Does Build tools page downplay `build`? #69

Open kwinkunks opened 1 year ago

kwinkunks commented 1 year ago

I feel like this section: https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-build-tools.html#summary-of-tools-hatch-vs-pdm-vs-poetry-and-setuptools

...is a bit confusing. I think a new packager will read this and still be unclear whether to package a pure Python project with build, PDM (as bullet 2 recommends), or Poetry (is it really the most popular? Citation needed). I think it might be better to place all the tools (build, PDM, Poetry, Hatch, and whatever else) on a more equal footing. Basically this section should match the decision tree diagram.

My own recommendation is to start with build for a simple project, then there are various reasons why you might choose another tool.

lwasser commented 1 year ago

hey there @kwinkunks 👋 and welcome!! this is great feedback. let's talk it through!

If we started with build, then immediately a user has to select a build back end. so are you assuming that would be setuptools, flit-core, pdm-build, hatchling, meson-python? build is the simplest front end but my concern for someone newer to the ecosystem is that build requires some more knowledge of the other tools you need (twine and a backend that suits your needs). Now the user has to select between all of the backends and there are so many - yikes!

the data on poetry came from a recent pypa survey -see the image here where most selected setuptools and poetry as their goto packaging tools. there were about 8000 responses i think - it was posted on PyPI (so conda users may not be there fully). The irony in that survey is that setuptools is a backend and poetry is a front end with a back end :)

do you see how this gets complicated? i do want this section to be clear and want to address your feedback. i'm just presenting where this gets a bit sticky. if a user picks up a tool like PDM then they have everything they need to get started in one tool. Same with poetry BUT they are limited to pure python and knowing about the upper bounds issues with adding deps in poetry.

thoughts?

NickleDave commented 1 year ago

Not to butt in but just to add a couple comments from one of the reviews providing context about PyPA/build: https://github.com/pyOpenSci/python-package-guide/pull/55#issuecomment-1452584459 https://github.com/pyOpenSci/python-package-guide/pull/55#issuecomment-1453273897