Skip to content

Commit e0175ff

Browse files
mikolalysenkoclaude
andcommitted
fix: ensure binary has execute permission in PyPI wrapper
pip/pipx may not preserve zip external_attr permissions when extracting wheels, causing PermissionError on the bundled binary. The wrapper now checks and adds execute permission at runtime if missing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8a6bef7 commit e0175ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pypi/socket-patch/socket_patch/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ def main():
1717
)
1818
sys.exit(1)
1919
bin_path = os.path.join(bin_dir, bins[0])
20+
if not os.access(bin_path, os.X_OK):
21+
os.chmod(bin_path, os.stat(bin_path).st_mode | 0o111)
2022
raise SystemExit(subprocess.call([bin_path] + sys.argv[1:]))

0 commit comments

Comments
 (0)