[FR] option for making unknown arguments to setup into a hard error
Nobody has claimed this yet.
- 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?
Sometimes users attempt to install build dependencies themselves (such as cffi). When they mess this up, and then run setup.py, the unknown options passed to setup.py become a warning, which users often miss in the large output.
The ability to make these into an exception would ensure users catch their errors early.
Describe the solution you'd like
A setup() argument (setup.cfg as well, I suppose) like error_on_unknown=True that changes https://github.com/pypa/setuptools/blob/ba3995e5705a22e13bb5d2231ac22c77e4417747/setuptools/_distutils/dist.py#L261-L262 into an exception, instead of a warning.
Alternative Solutions
No response
Additional context
No response
Code of Conduct
- I agree to follow the PSF Code of Conduct
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading setuptools/_distutils/dist.py around the unknown-argument warning referenced in the issue, then trace how setup.py and setup.cfg arguments reach that code. The work is done when an opt-in setup() setting makes unknown arguments raise an exception instead of only warning, with the requested configuration path addressed if supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100