Skip to content

Commit bd615ee

Browse files
committed
Test that there is no egg-info files accidentally leaking into the wheel
1 parent 283ce3b commit bd615ee

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
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
@@ -27,7 +27,6 @@
2727

2828
from .. import Command, __version__
2929
from ..warnings import SetuptoolsDeprecationWarning
30-
from .egg_info import egg_info as egg_info_cls
3130

3231
from distutils import log
3332

setuptools/tests/test_bdist_wheel.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,14 @@ def test_dist_info_provided(dummy_dist, monkeypatch, tmp_path):
633633
# preserve".
634634
(distinfo / "FOO").write_text("bar", encoding="utf-8")
635635

636-
bdist_wheel_cmd(bdist_dir=str(tmp_path), universal=True, dist_info_dir=str(distinfo)).run()
636+
bdist_wheel_cmd(bdist_dir=str(tmp_path), dist_info_dir=str(distinfo)).run()
637637
expected = {
638638
"dummy_dist-1.0.dist-info/FOO",
639639
"dummy_dist-1.0.dist-info/RECORD",
640640
}
641-
with ZipFile("dist/dummy_dist-1.0-py2.py3-none-any.whl") as wf:
642-
# Check that all expected files are there.
643-
assert set(wf.namelist()).intersection(expected) == expected
641+
with ZipFile("dist/dummy_dist-1.0-py3-none-any.whl") as wf:
642+
files_found = set(wf.namelist())
643+
# Check that all expected files are there.
644+
assert expected - files_found == set()
645+
# Make sure there is no accidental egg-info bleeding into the wheel.
646+
assert not [path for path in files_found if 'egg-info' in str(path)]

0 commit comments

Comments
 (0)