fix: set executable permission on CLI binary in Python wheel#419
Merged
SteveSandersonMS merged 2 commits intomainfrom Feb 10, 2026
Merged
fix: set executable permission on CLI binary in Python wheel#419SteveSandersonMS merged 2 commits intomainfrom
SteveSandersonMS merged 2 commits intomainfrom
Conversation
The repack step in build-wheels.mjs was producing wheels where copilot/bin/copilot had 0o644 (-rw-r--r--) permissions because setuptools strips the executable bit when building package data. After extracting the wheel for repack, restore chmod 0o755 on the CLI binary so that zf.write() captures the correct permissions. This ensures pip/uv install the binary as executable on Unix.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the Python SDK wheel repackaging step so the bundled Copilot CLI binary is installed with correct Unix executable permissions, avoiding post-install manual chmod.
Changes:
- During wheel repack, re-apply
0o755to the extractedcopilot/bin/copilot(andcopilot.exe) before re-zipping so the wheel captures executable mode bits correctly. - Add the necessary import to support the new permission-restoration logic in the embedded repack script.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When installing the Python SDK via pip/uv, the bundled CLI binary at copilot/bin/copilot is installed without the Unix executable bit, requiring users to manually chmod it.
Root Cause
setuptools strips the executable bit when packaging data files. The repack step in build-wheels.mjs then captures this 0o644 permission into the wheel ZIP.
Fix
After extracting the wheel for repack, restore chmod 0o755 on the CLI binary so zf.write() captures the correct permissions.