[BUG] Options declared in setup.cfg
can not override options declared in setup()
function
#4800
Labels
setup.cfg
can not override options declared in setup()
function
#4800
setuptools version
setuptools==75.1.0
Python version
Python 3.12.2
OS
Ubuntu 24.04.1 LTS (GNU/Linux 6.8.0-51-generic x86_64)
Additional environment information
I use the Miniconda
Description
I am reading the source code of
setuptools
to understand how it works when building a Python project. I noticed there is a comment in the 158 line insetuptools/_distutils/core.py
It suggests that options declared in the
setup.cfg
file will override options declared in thesetup()
function. However, when looking at the code ofConfigHandler.__setitem__()
insetuptools/config/setupcfg.py
, I notice the following weird code:It seems that it will not override the options already declared in the
setup()
functionExpected behavior
If the comment is right, is the above code unnecessary?
How to Reproduce
According to the output, options in
setup.cfg
do not override options insetup()
. Is it the correct or expected behavior?Output
Please see the above section
The text was updated successfully, but these errors were encountered: