diff --git a/.github/scripts/release_artifacts.py b/.github/scripts/release_artifacts.py index 7d9b473fc..05cb7b2e2 100644 --- a/.github/scripts/release_artifacts.py +++ b/.github/scripts/release_artifacts.py @@ -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") diff --git a/release/publish-artifacts.toml b/release/publish-artifacts.toml index 35d04f234..57bc58e66 100644 --- a/release/publish-artifacts.toml +++ b/release/publish-artifacts.toml @@ -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"