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
Use declarative metadata with pyproject.toml
#10356
Conversation
It seems that I'm going to mark this as draft for now, I may look at e.g. flit later (that Sphinx uses A |
2414dda
to
2091cc2
Compare
It was easier than expected to move to A |
To be fair, Python 3.6 is since EOL this January. |
As I commented at #9820 (comment), my large concern is supporting users. I suppose most of them would not know python at all. So I hesitate to depend on the latest libraries. I can accept to migrate package metadata that is not related to install itself (ex. classifiers). But I'm not sure it's worthy for us to migrate it partially. |
Users using pip will not notice any difference with this. |
I entirely agree we should be supporting users. I see three groups:
For group 1, For group 2, the redistributor (debian, RHEL, ubuntu, etc) ensures that the system has a consistent installation, and installs everything themselves. For group 3, there are no guarantees at all -- it is up to the user to ensure every dependency is installed and there are no conflicts. I would argue that the users of Sphinx are mostly in group 1, then group 2, then 3. There are five million downloads of Sphinx per month from PyPI. We can't know numbers for redistributors, or proxies of PyPI, so this is an inexact science. Group 2 users are in a precarious position when they attempt to use extensions like I would like to solve these challenges -- having a single distributable self-contained binary that is "sphinx" would be amazing. It would free us from constraints on system Python versions etc, whilst allowing integration with a particular python version for those that install via My conclusions are the following:
The issue in this PR -- changing our build process -- is unrelated to any of these issues. For users of I'm happy to propose a PR to Sphinx's policies @tk0miya to outline this and provide a place for more discussion, but I would strongly argue that we can make these important improvements and changes in our build system and dependencies without negatively affecting end users, which is the most important thing. A (Sorry for the long message, I didn't intend to write this much!) |
Note in case 3 you can do |
7f45bc2
to
1a28a4e
Compare
mypy config should also be moved into |
as an aside, is there any interest in moving to a full-blown package manager, such as Poetry? |
1a28a4e
to
055c6c2
Compare
I would like to move forwards with this--@tk0miya does my earlier comment make sense? The one line summary is that I propose we only support users installing from wheels on PyPI -- anything else is non-standard, and as we are volunteers here I think reasonable to put those limits on it. A |
- Move to pyproject.toml metadata - Update references to `setup.py` - Use pypa/build - Update workflows and tooling
055c6c2
to
ec3bcda
Compare
I've gone ahead with this for 5.2--though if we get reports from users that the new configuration seriously breaks things I will look at reverting the change. A |
@@ -4,6 +4,10 @@ Release 5.2.0 (in development) | |||
Dependencies | |||
------------ | |||
|
|||
* #10356: Sphinx now uses declarative metadata with ``pyproject.toml`` to | |||
create packages, using PyPA's ``build`` project as a build backend. Patch by |
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.
Just noticed this in the ChangeLog — build
is actually a frontend, flit_core
is the backend.
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.
Fixed, thank you.
A
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.
Thanks!
Requires #10355, #10352
This moves Sphinx's package metadata to the standards-compliant format, preserving setuptools-specific items with the
tool.setuptools
backend.Relates