question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FR] support pep-621 - storing core project metadata in pyproject.toml

See original GitHub issue

What’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:closed
  • Created 2 years ago
  • Reactions:18
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
RonnyPfannschmidtcommented, Oct 15, 2021

@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

1reaction
abravalhericommented, Jun 26, 2022

My interpretation of the status of the original steps is:

  • basic toml support in setuptools (just mirroring setup.cfg in pyproject.toml, as setup.cfg is still a supoerset of that the peps support

    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 in setup.cfg. I cannot do that alone, though, so I would appreciate input on this aspect.

  • a loader for pep-621 meta-data (ideally via packaging)

    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 if packaging implements the required APIs. Related to the discussion of https://github.com/pypa/packaging/pull/518.

  • hooks to pull in the pep-621 metadata

    I understand that this refers to setuptools plugins. I am tracking this in #3415

  • warnings for usages of tool.setuptools when core package metadata is viable (maybe via jsonschema + its deprecation mechanism)

    The existing implementation will raise a validation error if someone tries to specify tool.setuptools.name, tool.setuptools.version etc…

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found