-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[BUG] PEP 631 TOMLs can conflict with deprecated configuration files #3300
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
Comments
CC @abravalheri, thank you for your hard work! |
Hi @nullableVoidPtr, thank you for reporting this. Is the silent overwrite the best action for this scenario? |
The main concern here is PEP 517 builds silently using something which should have been a non-default fallback (at least in my case), so a warning would be good. There is a similar issue remediated at #3195, but the fix doesn't appear to apply to this case; not sure what's going on there but I'll need to debug. One fix I've thought about was something in |
Hi @nullableVoidPtr. With #3306,
This is a nice suggestion, however, for the time being I think we should avoid growing the number of "levers and knobs" in setuptools (they are already too many...). It might be just a personal impression, but using both |
Absolutely fair call to make, and even moreso once the backend is stable with project metadata. |
Uh oh!
There was an error while loading. Please reload this page.
setuptools version
setuptools==62.1.0
Python version
Python 3.10.4
OS
Arch Linux
Additional environment information
No response
Description
A package with PEP 621/631 compliant
pyproject.toml
and thebuild_meta
backend may have its metadata and other configuration information overlaid with other information fromsetup.py
orsetup.cfg
(which may be retained for fallback with--no-use-pep517
while setuptools transitions to a stable PEP 517 implementation by default).One cause is this helper function which guarantees that the "fallback"
setup.py
would be called even ifpyproject.toml
is fully defined.Expected behavior
I expected setuptools to identify that
pyproject.toml
has theproject
anddependencies
table, and would further ignore other configuration files (though I may be disregarding the value/use of dynamic fields with this expectation).How to Reproduce
pip install setuptools wheel build
git clone https://gist.github.com/nullableVoidPtr/d3f528136eff5c0e827ee98fd75da9dd
python -m build
cat project.egg-info/requires.txt
Output
There is a duplication of the dependency
click
and the inclusion ofwheel
which was only included insetup.cfg
.(Side note: the discrepancy in dependencies between
pyproject.toml
andsetup.py
is highly unlikely in actual packages, but is used to illustrate the issue here).There was no warnings relating to the conflict observed in the output of
python -m build
.Note that this also works with
setup.cfg
(replacingsetup.py
) with the following:The text was updated successfully, but these errors were encountered: