Skip to content

fix(python-sdk): chmod CLI binary at build time instead of runtime#3179

Open
mattConnHarbour wants to merge 1 commit intomainfrom
matthew/sd-2971-python-sdk-add-post-install-hook-to-chmod-cli-binary
Open

fix(python-sdk): chmod CLI binary at build time instead of runtime#3179
mattConnHarbour wants to merge 1 commit intomainfrom
matthew/sd-2971-python-sdk-add-post-install-hook-to-chmod-cli-binary

Conversation

@mattConnHarbour
Copy link
Copy Markdown
Contributor

Problem

CLI binary shipped without execute permissions (Python wheels strip them). In Docker: root installs, non-root user tries to exec, and is denied. Runtime os.chmod() fails for the same reason—non-root can't chmod a root-owned file.

Fix

Add setup.py build hooks that chmod the binary during wheel creation. Binary ships with execute permissions baked in, no runtime chmod needed.

Follow-up

Platform packages are nearly identical—could be generated from python-embedded-cli-targets.mjs instead of maintained manually.

Fixes Docker issue where root installs but non-root user runs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mattConnHarbour mattConnHarbour requested a review from a team as a code owner May 5, 2026 22:48
@linear
Copy link
Copy Markdown

linear Bot commented May 5, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant