Description
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 the build_meta
backend may have its metadata and other configuration information overlaid with other information from setup.py
or setup.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 if pyproject.toml
is fully defined.
Expected behavior
I expected setuptools to identify that pyproject.toml
has the project
and dependencies
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
click
wheel
click
There is a duplication of the dependency click
and the inclusion of wheel
which was only included in setup.cfg
.
(Side note: the discrepancy in dependencies between pyproject.toml
and setup.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
(replacing setup.py
) with the following:
[options]
install_requires =
click
wheel