setuptools version
HEAD (58.0.2)
Python version
(irrelevant)
OS
(irrelevant)
Additional environment information
No response
Description
When building a source tar.gz with python -m build, edit_config of setuptools is called to record information about the call in setup.cfg. During the rewrite, the case of the keys in the file is lost -- most notably, options.data_files loses the case of destination paths.
Expected behavior
The case of destination paths is preserved for data_files. More generally, all keys have their case preserved when building source tar.gzs
How to Reproduce
- Create a
setup.cfg with
[options.data_files]
cAsE=
file
file2
touch file file2
python3 -m build
Output
setup.cfg in the tar.gz loses the case: (extract with tar -xf dist/UNKNOWN-0.0.0.tar.gz && cat UNKNOWN-0.0.0/setup.cfg)
[options.data_files]
case =
file
file2
[egg_info]
tag_build =
tag_date = 0
Code of Conduct
setuptools version
HEAD (58.0.2)
Python version
(irrelevant)
OS
(irrelevant)
Additional environment information
No response
Description
When building a source
tar.gzwithpython -m build,edit_configofsetuptoolsis called to record information about the call insetup.cfg. During the rewrite, the case of the keys in the file is lost -- most notably,options.data_filesloses the case of destination paths.Expected behavior
The case of destination paths is preserved for
data_files. More generally, all keys have their case preserved when building sourcetar.gzsHow to Reproduce
setup.cfgwithtouch file file2python3 -m buildOutput
setup.cfgin the tar.gz loses the case: (extract withtar -xf dist/UNKNOWN-0.0.0.tar.gz && cat UNKNOWN-0.0.0/setup.cfg)Code of Conduct