Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix metadata_from_built only extracts one of the dist info files #100

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Release History
===============

v1.6.1 - (2023-08-29)
---------------------
- Fix :meth:`pyproject_api.Frontend.metadata_from_built` only extracts one of the dist info files.

v1.6.0 - (2023-08-29)
---------------------
- Remove ``build_<wheel|editable>`` from ``prepare_metadata_for_build_<wheel|editable>`` to allow separate config
Expand Down
1 change: 0 additions & 1 deletion src/pyproject_api/_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ def metadata_from_built(
if root.endswith(".dist-info"):
basename = root
zip_file.extract(name, extract_to)
break
if basename is None: # pragma: no branch
msg = f"no .dist-info found inside generated wheel {wheel}"
raise RuntimeError(msg)
Expand Down
1 change: 1 addition & 0 deletions tests/test_frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def test_metadata_from_built_wheel(
monkeypatch.chdir(tmp_path)
path, out, err = frontend.metadata_from_built(tmp_path, target)
assert path == tmp_path / "demo_pkg_inline-1.0.0.dist-info"
assert {p.name for p in path.iterdir()} == {"top_level.txt", "WHEEL", "RECORD", "METADATA"}
assert f" build_{target}" in out
assert not err

Expand Down