File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 9999
100100 cp "_stagehand/packages/server/dist/sea/${{ matrix.binary_name }}" "${{ matrix.output_path }}"
101101 chmod +x "${{ matrix.output_path }}" 2>/dev/null || true
102+ rm -f src/stagehand/_sea/.keep || true
102103 git add -f src/stagehand/_sea/*
103104
104105 - name : Build wheel
@@ -112,13 +113,24 @@ jobs:
112113 echo "Contents of src/stagehand/_sea/"
113114 ls -al src/stagehand/_sea || true
114115 python - <<'PY'
115- import pathlib, zipfile
116+ import pathlib, zipfile, collections, sys
117+ had_error = False
116118 for wheel in sorted(pathlib.Path("dist").glob("*.whl")):
117119 print(f"Contents of {wheel.name} entries matching stagehand/_sea")
118120 with zipfile.ZipFile(wheel, "r") as zf:
121+ names = [info.filename for info in zf.infolist()]
122+ counts = collections.Counter(names)
123+ dups = sorted([name for name, n in counts.items() if n > 1])
119124 for info in zf.infolist():
120125 if "stagehand/_sea/" in info.filename:
121126 print(info.filename)
127+ if dups:
128+ had_error = True
129+ print("ERROR: duplicate zip entries detected:")
130+ for name in dups:
131+ print(f" {counts[name]}x {name}")
132+ if had_error:
133+ sys.exit(1)
122134 PY
123135
124136 - name : Upload wheel artifact
Original file line number Diff line number Diff line change @@ -91,9 +91,10 @@ path = "hatch_build.py"
9191
9292[tool .hatch .build .targets .wheel ]
9393packages = [" src/stagehand" ]
94- include = [
95- " src/stagehand/_sea/* "
94+ exclude = [
95+ " src/stagehand/_sea/.keep "
9696]
97+
9798[tool .hatch .build .targets .wheel .force-include ]
9899"src/stagehand/_sea" = " stagehand/_sea"
99100
You can’t perform that action at this time.
0 commit comments