Skip to content

[BUG] source distributions do not preserve case in keys of setup.cfg #2773

@aerusso

Description

@aerusso

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

  1. Create a setup.cfg with
[options.data_files]
cAsE=
  file
  file2
  1. touch file file2
  2. 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

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.bug

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions