-
Notifications
You must be signed in to change notification settings - Fork 970
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 discussion "Is setup.py deprecated?" #1331
Conversation
a951e6c
to
eb31cf1
Compare
I wrote this based on the questions I have seen on StackOverflow. It is not meant to be exhaustive, and I am sure it can be improved on over time. However imperfect this document is in this state, I think it is important to get such a document published as soon as possible and build from there. |
eb31cf1
to
029cf8a
Compare
Looking through the updated text and the comments here I think that there are two different purposes being conflated:
These are two different purposes and I think that it is fine that this page is aimed only at the former. Presumably the intention is that this page could be used as the new URL in an update for this deprecation message: $ python setup.py bdist_wheel
running bdist_wheel
running build
running build_py
.../lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
installing to build/bdist.linux-x86_64/wheel
... For that purpose I think that this page is reasonable. Separately a porting from setup.py guide is needed and it could be linked from here but this page does not need to be that. Keeping this page small and compact to explain what exactly is or is not deprecated is good if the intention is that the deprecation warning should link to here. One thing I am not sure about is the statement
This seems like the kind of thing that would end up being out of date and conflicting with future docs in other places. Perhaps at least this could be qualified like
Another thing I would add is an explicit statement that setuptools itself is not deprecated and that there is no intention for it to be deprecated in future. Lastly I would either show a minimal example of a pyproject.toml using setuptools as the backend or at least ensure that a page describing how to do so is being linked to. Ideally this would be a link to a guide for porting from setup.py but if that guide does not exist yet then at least linking to here would be good: |
Thanks a lot for the comments. Hopefully tomorrow, I will take some time to re-read all comments carefully. My intention is to rewrite in order to tighten the focus on the "deprecation of |
029cf8a
to
cd0b319
Compare
Assuming that this goes with #1341 I think that what is here is fine. I would just remove the section about pyproject.toml from this page so that it is purely focused on what is deprecated and what the direct alternatives are supposed to be. |
cd0b319
to
ff7183a
Compare
So #1341 has been started as a companion for this PR. So some bits can be moved to that other page. Here are some of the latest updates:
Of course, everything can be rephrased, reworded, reordered, clarified, but I guess I might be running out of steam (already? :D ), so maybe it is better to get this merged so that others can take over. There is clearly a bunch of things that have been commented here, but I either do not understand or do not know how to phrase. |
ff7183a
to
accda2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work, @sinoroc!
@sinoroc so the guidance I follow and recommend other people do is:
|
+1 The other day, somebody introduced me to https://conventionalcomments.org in another PyPA repo, I think. It seems like this is something that could improve the communication even more.
Yeah, a few days ago I merged a PR (jazzband/pip-tools#1681) that took 13 months to complete, with hundreds of review comments (my fault partially). I'm pretty sure it was exhausting to all the parties involved. I'll try to take a prompt look at this PR since I haven't had a chance to review properly and will try to get it merged unless there's a noticeable problem. |
Aha… So the CI is failing with: /home/runner/work/packaging.python.org/packaging.python.org/source/discussions/setup-py-deprecated.rst:129: WARNING: term not in glossary: 'Build Frontend'
/home/runner/work/packaging.python.org/packaging.python.org/source/discussions/setup-py-deprecated.rst:129: WARNING: term not in glossary: 'Build Backend' |
So this should be merged together with #1329 and it'll be fine... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sinoroc I'm going to merge this, but I saw some punctuation and grammar mistakes in the text. Would you mind feeding it to LanguageTool and/or Grammarly and sending the fixes as a follow-up?
Perhaps you also want to change list-item 2 of the doc for setup.py
|
@EpicWink that sounds like another follow-up. This PR is about a "discussion" document, while your suggestion concerns a "guide". |
462eaa2
to
5621191
Compare
5621191
to
a717141
Compare
Thanks for the suggestion, done Also rebased on main so that we have working links to the build backend and frontend glossary definitions. And fixed the link to setuptools page. Later... Rebased again, to check against the Furo theme, and also I added some usage of the |
a717141
to
38c66ba
Compare
38c66ba
to
1415c8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple more minor things.
Nice work @sinoroc ! |
PR preview demo: https://python-packaging-user-guide--1331.org.readthedocs.build/en/1331/discussions/setup-py-deprecated/.