-
Notifications
You must be signed in to change notification settings - Fork 9
Don't include the binary in the built wheel. #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
wanlin31
commented
Sep 9, 2025
wanlin31
commented
Sep 9, 2025
wanlin31
commented
Sep 9, 2025
wanlin31
commented
Sep 9, 2025
4df2c4b to
9e22777
Compare
wanlin31
commented
Sep 9, 2025
wanlin31
commented
Sep 9, 2025
9e22777 to
eef2578
Compare
wanlin31
commented
Sep 9, 2025
ab32626 to
a0fea66
Compare
hkt74
approved these changes
Sep 9, 2025
a0fea66 to
045416b
Compare
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.
The Problem
Previously, our customized build hook downloaded a platform-specific Go executable and embedded it directly into the Python wheel.
This creates a platform mismatch: the embedded executable matches the platform that built the package, which is not necessarily the same as the platform running the package (e.g., a wheel built on a Linux CI runner will fail for a developer on macOS).
Rejected Approaches
Bundle all platform executables: This was rejected as it would significantly bloat the Python wheel size.
Build platform-specific wheels (Python standard): While this is the standard Python approach (e.g., one wheel for manylinux_x86_64, one for macosx_arm64, etc.), it adds significant complexity and overhead to our release process.
Solution
This PR follows the pattern used by the TypeScript SDK:
The Python wheel no longer contains any pre-built executable.
We have added a "post-install" hook that runs when the user executes the python test-server-sdk.
This hook detects the user's current runtime platform (OS and architecture) and downloads the correct, compatible Go executable at installation time.
This ensures the user always has the correct binary for their environment without bloating the package or complicating the release matrix.