Skip to content

Commit c793c2c

Browse files
authored
Fix metadata_from_built only extracts one of the dist info files (#100)
1 parent 0b2c1b7 commit c793c2c

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

docs/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Release History
22
===============
33

4+
v1.6.1 - (2023-08-29)
5+
---------------------
6+
- Fix :meth:`pyproject_api.Frontend.metadata_from_built` only extracts one of the dist info files.
7+
48
v1.6.0 - (2023-08-29)
59
---------------------
610
- Remove ``build_<wheel|editable>`` from ``prepare_metadata_for_build_<wheel|editable>`` to allow separate config

src/pyproject_api/_frontend.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,6 @@ def metadata_from_built(
480480
if root.endswith(".dist-info"):
481481
basename = root
482482
zip_file.extract(name, extract_to)
483-
break
484483
if basename is None: # pragma: no branch
485484
msg = f"no .dist-info found inside generated wheel {wheel}"
486485
raise RuntimeError(msg)

tests/test_frontend.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def test_metadata_from_built_wheel(
192192
monkeypatch.chdir(tmp_path)
193193
path, out, err = frontend.metadata_from_built(tmp_path, target)
194194
assert path == tmp_path / "demo_pkg_inline-1.0.0.dist-info"
195+
assert {p.name for p in path.iterdir()} == {"top_level.txt", "WHEEL", "RECORD", "METADATA"}
195196
assert f" build_{target}" in out
196197
assert not err
197198

0 commit comments

Comments
 (0)