Skip to content

Commit a68d6b1

Browse files
linesightclaude
andcommitted
build_distrib: preserve executable permissions in wheel zip entries
ZipFile.write() does not preserve Unix file mode bits, so the subprocess binary inside the wheel lost its +x permission. pip extracts it as a non-executable file, and CEF cannot launch the renderer process, leaving browser windows blank. Use ZipInfo.from_file() which stores the real file mode in the zip entry's external_attr field. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 75965ca commit a68d6b1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/build_distrib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ def _add_bytes(arcname, data):
7979
digest = base64.urlsafe_b64encode(
8080
hashlib.sha256(data).digest()).rstrip(b"=").decode()
8181
records.append((arcname, "sha256=" + digest, str(len(data))))
82-
zf.write(filepath, arcname)
82+
info = zipfile.ZipInfo.from_file(filepath, arcname)
83+
zf.writestr(info, data)
8384

8485
# dist-info/METADATA
8586
_add_bytes(dist_info + "/METADATA", (

0 commit comments

Comments
 (0)