pypa / pypa/setuptools

[FR] Entrypoints that run post pyproject application and after pyproject read

Open
#4,416 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Needs Triage
Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

What's the problem this feature will solve?

I'm maintaining a setuptools plugin, interally.

I have found myself mokeypatching setuptools.config.pyprojecttoml.load_file to inject defaults that normally rise an error.
I have also found myself wanting injecting things into the project description part of METADATA file of a wheel with no good way to do it because dynamic readme files seem to handled after anything in project.entry-points."setuptools.finalize_distribution_options

Describe the solution you'd like

Entrypoint that hook into the loading/validation process of the pyproject.tom file and also after the fully loaded and realized pyproject.toml to change dist after that.

Alternative Solutions

No response

Additional context

No response

Code of Conduct
  • I agree to follow the PSF Code of Conduct
### Tasks

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading setuptools.config.pyprojecttoml.load_file and the project.entry-points."setuptools.finalize_distribution_options" hook mentioned in the issue. Trace when pyproject.toml is loaded, validated, and realized, then determine the entrypoint behavior needed before and after those stages; done means both requested extension points are defined and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.