[FR] support pep-621 - storing core project metadata in pyproject.toml
See original GitHub issueWhat’s the problem this feature will solve?
this is intended to build on #1688
with PEP-621 python packaging has been extended with a standard to include core metadata in pyproject.toml
Describe the solution you’d like
in order for setuptools to support it i beleive i see the need for the following steps
- basic toml support in setuptools (just mirroring setup.cfg in pyproject.toml, as setup.cfg is still a supoerset of that the peps support
- a loader for pep-621 meta-data (ideally via packaging)
- #3415
- warnings for usages of
tool.setuptools
when core package metadata is viable (maybe via jsonschema + its deprecation mechanism)
Alternative Solutions
No response
Additional context
Support incremental complexity and build steps for packages
Code of Conduct
- I agree to follow the PSF Code of Conduct
Issue Analytics
- State:
- Created 2 years ago
- Reactions:18
- Comments:21 (21 by maintainers)
Top Results From Across the Web
PEP 621 – Storing project metadata in pyproject.toml
Abstract. This PEP specifies how to write a project's core metadata in a pyproject.toml file for packaging-related tools to consume.
Read more >Sébastien Eustace (@SDisPater) / Twitter
Now, regarding PEP support: PEP 621 (Storing project metadata in pyproject.toml) will be supported by Poetry in its 2.0 version – which is...
Read more >Support pyproject.toml and PEP-621 : PY-54440
Support pyproject.toml and PEP-621 ... PEP 621 - Storing project metadata in pyproject.toml ... Ask rebuilding the project if the file changed.
Read more >Untitled
Asking for help, clarification, or responding to other answers. 1.正常安装流程: pyqt5安装直接 ... PEP 621: Storing project metadata in pyproject.toml.
Read more >PEP 621 Metadata - PDM
The project metadata are stored in the pyproject.toml . ... can split a long description onto multiple lines, thanks to TOML support for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@abravalheri if people put Metadata that has a location as per the pep into the tool. Setuptools table instead, there should be a warning /error
The table is absolutely needed as setup.cfg is a superset of the Metadata the pep directly in cooperates
My interpretation of the status of the original steps is:
Basic support for
pyproject.toml
configuration is currently implemented in setuptools. I am being very conservative about the[tool.setuptools]
table because I want us to use this opportunity to reflect what would be the best shape for this data structure (ideally simplifying stuff), not only mirror what is currently available insetup.cfg
. I cannot do that alone, though, so I would appreciate input on this aspect.The existing implementation uses tomli to load
pyproject.toml
and then a series of custom functions to apply the data to the distribution class. But I am happy to replace it ifpackaging
implements the required APIs. Related to the discussion of https://github.com/pypa/packaging/pull/518.I understand that this refers to
setuptools
plugins. I am tracking this in #3415The existing implementation will raise a validation error if someone tries to specify
tool.setuptools.name
,tool.setuptools.version
etc…