Skip to content

Commit

Permalink
Test that there is no egg-info files accidentally leaking into the wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
pelson committed Sep 16, 2024
1 parent 39d6a31 commit 94a3cf1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion newsfragments/1825.bugfix.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Enabled passing dist-info-dir to the bdist_wheel, and to the PEP-517 build backend. Therefore, metadata can now be injected prior to wheel building when following PEP-517 -- by :user:`pelson`
Allow passing dist-info-dir to the bdist_wheel command, as well as to the PEP-517 build backend. Metadata can therefore now be injected prior to wheel building when following PEP-517 -- by :user:`pelson`
1 change: 0 additions & 1 deletion setuptools/command/bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from wheel.wheelfile import WheelFile

from .. import Command, __version__
from .egg_info import egg_info as egg_info_cls

from distutils import log

Expand Down
7 changes: 5 additions & 2 deletions setuptools/tests/test_bdist_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,5 +630,8 @@ def test_dist_info_provided(dummy_dist, monkeypatch, tmp_path):
"dummy_dist-1.0.dist-info/RECORD",
}
with ZipFile("dist/dummy_dist-1.0-py2.py3-none-any.whl") as wf:
# Check that all expected files are there.
assert set(wf.namelist()).intersection(expected) == expected
files_found = set(wf.namelist())
# Check that all expected files are there.
assert expected - files_found == set()
# Make sure there is no accidental egg-info bleeding into the wheel.
assert not [path for path in files_found if 'egg-info' in str(path)]

0 comments on commit 94a3cf1

Please sign in to comment.