Open
Conversation
| MACOS_VERSION=$(sw_vers -productVersion | cut -d '.' -f 1) | ||
|
|
||
| if [ "$ARCH" = "x86_64" ]; then | ||
| PLATFORM="macosx_${MACOS_VERSION}_0_x86_64" |
There was a problem hiding this comment.
could we call this Darwin or darwin to match the output of uname?
| echo "==========================================" | ||
| echo "All wheels built successfully!" | ||
| echo "Output directory: $OUTPUT_DIR" | ||
| ls -lh "$OUTPUT_DIR"/*.whl 2>/dev/null || echo "No wheels found" |
There was a problem hiding this comment.
This check should be earlier then exit with failure if no wheels are found
|
|
||
| # Detect architecture and macOS version | ||
| ARCH=$(uname -m) | ||
| MACOS_VERSION=$(sw_vers -productVersion | cut -d '.' -f 1) |
There was a problem hiding this comment.
why do we care what version of macos is used for building? Looks like you enforce a minimum version, but idk if we need to include that in the package name
| # This script clones the official unitree_sdk2 repo and builds wheels using pip | ||
|
|
||
| # Configuration | ||
| REPO_URL=${REPO_URL:-"https://github.com/unitreerobotics/unitree_sdk2_python.git"} |
There was a problem hiding this comment.
should this be amazon-far/unitree_sdk2_python?
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.
Summary
Adds
build_osx_wheels.sh
to build Python wheels for macOS (both Apple Silicon and Intel).
What's Changed
New script:
build_osx_wheels.sh
Clones unitree_sdk2_python repository
Builds wheels for Python 3.8, 3.9, 3.10, and 3.11
Automatically detects architecture (arm64/x86_64) and macOS version
Properly tags wheels with standard macOS platform identifiers
Outputs to dist/ directory
Includes automatic cleanup of temporary files
Usage
Build for all Python versions (3.8-3.11)
./deploy/build_osx_wheels.sh
Build for specific Python versions
PYTHON_VERSIONS="3.10 3.11" ./deploy/build_osx_wheels.sh
Use custom repository/branch
REPO_URL="https://github.com/yourfork/unitree_sdk2_python.git" BRANCH="dev" ./deploy/build_osx_wheels.sh
Output
Wheels are created in dist/ with proper naming convention:
unitree_sdk2-1.0.1-cp38-cp38-macosx_11_0_arm64.whl
unitree_sdk2-1.0.1-cp39-cp39-macosx_11_0_arm64.whl
unitree_sdk2-1.0.1-cp310-cp310-macosx_11_0_arm64.whl
unitree_sdk2-1.0.1-cp311-cp311-macosx_11_0_arm64.whl
Platform tags follow the standard pip format: macosx_{version}0{arch}
Notes
Complements existing build_wheels.sh (Linux/Docker-based)
Version number sourced from local pyproject.toml
Pure Python wheels (~82KB) - no native extensions
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.