pypa / pypa/setuptools

"build/lib" Directory is not cleaned up on bdist_wheel

Open
#1,871 8 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

The bdist_wheel command (and probably also other bdist* commands) could result in not-reproducible results:

  • create project with file_a.py and file_b.py
  • run setup.py bdist_wheel
  • rename file_b.py to file_c.py
  • run setup.py bdist_wheel (without touching "build" directory in the meantime)
  • the resulting wheel will contain file_a.py, file_b.py and file_c.py

This is especially problematic when transforming a module from a single python file to a directory (or vice versa). In this case both module implementations are delivered.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the sequence with setup.py bdist_wheel, renaming file_b.py to file_c.py without removing the build directory. Inspect how the build directory is reused during bdist_wheel and other bdist* commands; done means the resulting wheel contains only the current project files, without stale module implementations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.