-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Quickstart" + "Move from setup.py" section to build's docs #438
Comments
Hi, thank you for opening this issue. I am +0 on this, I wouldn't mind having the proposed documentation here, but another reasonable place would be https://github.com/pypa/packaging.python.org. To me, it is not clear which option is better, nothing particular really stands out here 😅 I would like to hear what other people think. cc @pypa/packaging-user-guide-editors |
I'd rather have (better?) links to packaging.python.org, I don't think we need to explain how to set up a package. Some updates could be made there (I've been really hoping for a PEP 621 update, but that's waiting on setuptools, which is happening at some point). Those docs could take some of the ideas, though - I'd really like to see better If we have the same docs in many places, we have to maintain more, versions go out of date, etc. Build is not tied to a specific backend, either - maybe link to some popular backend docs (setuptools, flit)? A few notes:
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta" is a minimum pyproject.toml. Though I'd probably recommend flit & PEP 621 config over setup tools for non-compiled projects. |
All for de-duplication. If the main packaging user guide is where this should live, lets do it, My main goal here is I feel build's docs should link to that source of truth. Maybe we should create my suggestion / hybrid / part of it there and link to it from build'ss README + Docs. As someone who's not involved in all this backend + frontend work (that is awesome and we need), I would love a source of truth to answer the two following questions for package creators and maintainers:
For years, setup.py, setup.cfg, pyproject.toml + other files for setuptools, poetry and pipenv have noted changes and plans but it's hard to know what package/modules owners should use and why/when. Also it's hard to know what to do to be as future proof too. Just trying to help here. |
The best answer I know of for those questions is https://scikit-hep.org/developer, though I'm biased as I wrote most of it. :) I think python.packaing.org's tutorial is in pretty good shape, though pypa/packaging.python.org#1031 would be a huge step forward. And it should be clearly and nicely linked, yes! |
Awesome - This is all the docs I couldn't find (and will be better once PR 1031 is landed). Would a PR adding a section linking to https://packaging.python.org/en/latest/tutorials/packaging-projects/ for making a project that could use build be accepted and a start here? E.g. Are you a Package Maintainer?Want to know the latest way to setup your projects to use build? Visit the python.packaing.org's tutorial to get started. |
Great discussion here. I'm one of the PyPUG maintainers, and am particularly interested in making the packaging tutorial helpful. That said, its intended audience is folks who are completely new to packaging, i.e., not people who are looking for a general-purpose reference for how to set up a project. I don't know if such a thing exists, but that might be dependent on the choice of build backend. For example, it looks like the setuptools quickstart is pretty decent. I'd expect similar from Flit, PDM, Poetry, etc. |
How about:
|
Howdy,
I decided to catch up on the PyPA packaging world on all my projects today and feel there is room for a section in build's docs to describe the ways to start a new project and/or move from traditional
setup.py
project to abuild
project.If this is not the goal of builds docs and it's somewhere else, how can we make it easier to find? It's very hard to find and answer "How should I build a new Python prokject in 2022" ... I know there is lots of legacy etc. here but making this easier to find and link to should help new projects adopt these things. I did see pip makes mention from googling
I also got recommendations that are not mention in the docs (unless I'm blind which there is a chance). My example here was adding a section to pyproject.toml - So I feel we should mention that somewhere. My suggestion was:
Suggested Overview
(I will update as discussion suggests etc.)
setup.py
is supported today but is deprecatedbuild
installed into your [virtual] environmentpyproject.toml
python -m build
(Totally up for reasoning - Thus the issue before the PR)
Side Questions
Please lets focus on the quick start and open other issues for other docs enhancements that come from this discussion, if they do.
The text was updated successfully, but these errors were encountered: