Skip to content

[BUG] build --wheel leaves unnecessary files #5134

@abitrolly

Description

@abitrolly

setuptools version

setuptools==80.9.0

Python version

Python 3.13

OS

Linux

Additional environment information

No response

Description

(originally reported in pypa/build#958)

setuptools creates unnecessary files when building wheels.

Consider this build session with default setuptools backend.

cd /tmp
➜  /tmp mkdir xxx
➜  /tmp cd xxx
➜  xxx tree
.

0 directories, 0 files
➜  xxx touch pyproject.toml
➜  xxx python -m build --wheel
...
Successfully built unknown-0.0.0-py3-none-any.whl
➜  xxx tree
.
├── build
│   └── bdist.linux-x86_64
├── dist
│   └── unknown-0.0.0-py3-none-any.whl
├── pyproject.toml
└── UNKNOWN.egg-info
    ├── dependency_links.txt
    ├── PKG-INFO
    ├── SOURCES.txt
    └── top_level.txt

5 directories, 6 files

Expected behavior

The only relevant files here are:

├── dist
│   └── unknown-0.0.0-py3-none-any.whl
├── pyproject.toml

How to Reproduce

touch pyproject.toml
python -m build --wheel

Output

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