Skip to content

Commit 94a3cf1

Browse files
committed
Test that there is no egg-info files accidentally leaking into the wheel
1 parent 39d6a31 commit 94a3cf1

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

newsfragments/1825.bugfix.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +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`
1+
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`

setuptools/command/bdist_wheel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from wheel.wheelfile import WheelFile
2727

2828
from .. import Command, __version__
29-
from .egg_info import egg_info as egg_info_cls
3029

3130
from distutils import log
3231

setuptools/tests/test_bdist_wheel.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,5 +630,8 @@ def test_dist_info_provided(dummy_dist, monkeypatch, tmp_path):
630630
"dummy_dist-1.0.dist-info/RECORD",
631631
}
632632
with ZipFile("dist/dummy_dist-1.0-py2.py3-none-any.whl") as wf:
633-
# Check that all expected files are there.
634-
assert set(wf.namelist()).intersection(expected) == expected
633+
files_found = set(wf.namelist())
634+
# Check that all expected files are there.
635+
assert expected - files_found == set()
636+
# Make sure there is no accidental egg-info bleeding into the wheel.
637+
assert not [path for path in files_found if 'egg-info' in str(path)]

0 commit comments

Comments
 (0)