Skip to content
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
5 changes: 3 additions & 2 deletions .github/scripts/release_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,11 +631,12 @@ def _python_distribution_name_from_wheel(path: Path, expected: set[str]) -> str:

def _python_distribution_name_from_sdist(path: Path, expected: set[str]) -> str | None:
with tarfile.open(path, "r:gz") as archive:
metadata = [member for member in archive.getmembers() if member.name.endswith("/PKG-INFO")]
# Root-level PKG-INFO only: setuptools sdists also carry *.egg-info/PKG-INFO (sc-publish#74).
metadata = [m for m in archive.getmembers() if m.name.endswith("/PKG-INFO") and m.name.count("/") == 1]
if not metadata:
return None
if len(metadata) != 1:
raise SystemExit(f"{path}: expected exactly one sdist PKG-INFO file")
raise SystemExit(f"{path}: expected exactly one root-level sdist PKG-INFO file")
extracted = archive.extractfile(metadata[0])
if extracted is None:
raise SystemExit(f"{path}: unable to read sdist PKG-INFO")
Expand Down
2 changes: 1 addition & 1 deletion release/publish-artifacts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ source = "crates/hermes-atm"
build_system = "setuptools"
module_path = "crates/hermes-atm/src/hermes_atm"
sdist = true
wheels = ["ubuntu-latest", "macos-latest", "windows-latest"]
wheels = ["ubuntu-latest"]

[channels.pypi]
workflow = "pypi-publish.yml"
Expand Down
Loading