From 7e581c460d9273d42ec1a6dc15ee5f51af70664e Mon Sep 17 00:00:00 2001 From: Gabrielle Merritt Date: Wed, 21 Jan 2026 12:16:46 -0800 Subject: [PATCH] Add macOS wheel building script --- .DS_Store | Bin 6148 -> 0 bytes deploy/build_osx_wheels.sh | 115 +++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+) delete mode 100644 .DS_Store create mode 100755 deploy/build_osx_wheels.sh diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0 /dev/null; then + PYTHON_EXE="python${PYTHON_VER}" + elif command -v python3 &> /dev/null && python3 --version | grep -q "$PYTHON_VER"; then + PYTHON_EXE="python3" + else + echo "Warning: Python $PYTHON_VER not found, skipping..." + continue + fi + + echo "Using Python: $PYTHON_EXE ($(${PYTHON_EXE} --version))" + + # Install build dependencies + echo "Installing build dependencies..." + ${PYTHON_EXE} -m pip install --upgrade pip setuptools wheel build + + # Get Python tag + PY_TAG=$(${PYTHON_EXE} -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')") + echo "Setting py tag as: ${PY_TAG}" + + # Build wheel directly into output directory and rename + echo "Building wheel with pip..." + ${PYTHON_EXE} -m pip wheel . --no-deps --no-cache-dir -w "$OUTPUT_DIR" && \ + cd "$OUTPUT_DIR" && \ + LATEST_WHEEL=$(ls -t unitree_sdk2*.whl 2>/dev/null | head -1) && \ + if [ -n "$LATEST_WHEEL" ] && [ -f "$LATEST_WHEEL" ] && [[ ! "$LATEST_WHEEL" =~ ${PY_TAG}-${PY_TAG}-${PLATFORM}\.whl$ ]]; then + new_name="unitree_sdk2-${UNITREE_TAG}-${PY_TAG}-${PY_TAG}-${PLATFORM}.whl" + mv "$LATEST_WHEEL" "$new_name" && echo "Created: $new_name" + else + echo "Wheel: ${LATEST_WHEEL:-not found}" + fi + cd "$TEMP_DIR/unitree_sdk2" + echo "✓ Wheel for Python $PYTHON_VER completed" + echo "" +done + +echo "==========================================" +echo "All wheels built successfully!" +echo "Output directory: $OUTPUT_DIR" +ls -lh "$OUTPUT_DIR"/*.whl 2>/dev/null || echo "No wheels found" +echo "=========================================="