pypa / pypa/setuptools

[BUG] setuptools lets unexpected files to be copied to the dist-info

Open
#3,686 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

setuptools version

65.5.1

Python version

Python 3.11

OS

Fedora Linux 38

Additional environment information

Observed during the RPM build of docutils 0.19

Description

docutils 0.19 ship sdist build with setuptools with egg-info/ containing those html files next to their txt counterparts:

dependency_links.html
SOURCES.html
top_level.html

When we build wheel out of the sdist, those three files are copied into the dist-info metadata.

Expected behavior

I expect that the HTML files won't make it to wheel.

How to Reproduce

Grab docutils 0.19 sdist from PyPI
Unpack the archive, cd to it and build distribution, eg. with python -m build
Examine the wheel's dist-info files

Output
$ ls docutils-0.19.dist-info 
COPYING.txt
dependency_links.html
entry_points.txt
METADATA
RECORD
SOURCES.html
top_level.html
top_level.txt
WHEEL

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

Reproduce the report by unpacking the docutils 0.19 sdist and running python -m build, then inspect the generated docutils-0.19.dist-info directory. Verify the completed change keeps metadata such as COPYING.txt and top_level.txt while excluding dependency_links.html, SOURCES.html, and top_level.html.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.