Skip to content

fix: parse Python cp tag for unitree/booster wheel URLs; bump unitree to 0.1.3#104

Merged
kingb merged 2 commits into
amazon-far:mainfrom
kingb:dev/kingbrnd/fix-setup-py-unitree-py312
May 12, 2026
Merged

fix: parse Python cp tag for unitree/booster wheel URLs; bump unitree to 0.1.3#104
kingb merged 2 commits into
amazon-far:mainfrom
kingb:dev/kingbrnd/fix-setup-py-unitree-py312

Conversation

@kingb
Copy link
Copy Markdown
Contributor

@kingb kingb commented Apr 28, 2026

Summary

Fix the unitree_sdk2 and booster_robotics_sdk wheel URL construction in src/holosoma_inference/setup.py so pip install -e .[unitree,booster] works on Python ≥ 3.11.

Previously:

  • UNITREE_VERSION = "0.1.1" hardcoded.
  • Wheel URL template hardcoded cp310-cp310 in both SDKs' URL patterns.

On Python 3.11 or 3.12 the install would fetch a cp310 wheel URL and fail (at best) or silently install the wrong ABI (at worst).

Changes

  • Bump UNITREE_VERSION to 0.1.3 (latest release; ships cp38/cp310/cp311/cp312 × aarch64/x86_64 wheels).
  • Parse sys.version_info to pick the matching cp{X}{Y} tag from a supported set {(3,8), (3,10), (3,11), (3,12)}.
  • Raise RuntimeError on unsupported Python versions (listing the supported set) so the install failure is explicit rather than silently mis-tagged.

Why now

JetPack 7.1 / Ubuntu 24.04 (Noble) native Python is 3.12, and that's the target for the upcoming Thor Docker image. Without this fix, the inference Docker layer can't install the [unitree] extra.

Test plan

  • URL construction verified across Python 3.8 / 3.10 / 3.11 / 3.12 — all render the matching cp{X}{Y} tag.
  • pip install -e src/holosoma_inference[unitree,booster] on Python 3.10, linux/amd64 → fetches cp310 wheels; unitree_interface and booster_robotics_sdk import successfully.
  • pip install -e src/holosoma_inference[unitree,booster] on Python 3.12, linux/amd64 → fetches cp312 wheels; imports successfully (depends on Bump version to 0.1.3 unitree_sdk2#10 — merged).
  • Unsupported Python (3.9, 3.13) raises RuntimeError listing supported versions.
  • HEAD-checked all 12 wheel URL combos (unitree + booster × cp310/cp311/cp312 × x86_64/aarch64) — all return HTTP 200.

… to 0.1.3

setup.py hardcoded cp310 in the wheel URL template, so `pip install .[unitree]`
on Python 3.11/3.12 built a 404 URL. Parse sys.version_info to pick the
matching cp tag from the wheel build matrix (cp38/cp310/cp311/cp312), and
bump UNITREE_VERSION to 0.1.3 so the correct wheel file is fetched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kingb kingb requested a review from tomasz-lewicki April 28, 2026 22:48
Copy link
Copy Markdown
Contributor

@tomasz-lewicki tomasz-lewicki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for the cp_tag implicit default.

Comment thread src/holosoma_inference/setup.py Outdated
Address review feedback: fall-through to cp310 masked the real problem.
Now raise a RuntimeError listing supported versions at setup-time so the
install failure is explicit.
@kingb kingb merged commit 5d9356a into amazon-far:main May 12, 2026
9 checks passed
@kingb kingb deleted the dev/kingbrnd/fix-setup-py-unitree-py312 branch May 12, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants