Skip to content

feat(python): add 3.12.13 and install dev headers to subos sysroot#58

Merged
Sunrisepeak merged 1 commit intomainfrom
feat/python-3.12-and-dev-headers
Mar 22, 2026
Merged

feat(python): add 3.12.13 and install dev headers to subos sysroot#58
Sunrisepeak merged 1 commit intomainfrom
feat/python-3.12-and-dev-headers

Conversation

@Sunrisepeak
Copy link
Copy Markdown
Member

Summary

  • Add Python 3.12.13 (cpython-standalone) download URL for Linux x86_64, enabling xlings install python@3.12
  • In config(), automatically copy include/ headers into subos sysroot (subos_sysrootdir()/usr/include/) so that the subos GCC can find pyconfig.h when compiling C extensions
  • Multi-version support: both python3.12 and python3.13 headers coexist in sysroot
  • Switch versions via xlings use python@3.12 / xlings use python@3.13

Motivation

When using xlings' subos GCC to pip install packages with C extensions (e.g. evdev, mujoco, dm-tree), compilation fails with:

fatal error: x86_64-linux-gnu/python3.12/pyconfig.h: No such file or directory

The subos GCC only searches <sysroot>/usr/include/, which lacks Python dev headers. This PR copies them from the python-build-standalone install into the sysroot during config().

Python 3.12 is also needed for projects like OpenPI which pin numpy<2.0.0 (incompatible with Python 3.13's dm-tree wheels).

Test plan

  • xlings install python@3.12 -y — downloads and installs successfully
  • xlings install python@3.13 -y — still works
  • xlings use python@3.12 — switches active version
  • Both python3.12/pyconfig.h and python3.13/pyconfig.h present in subos sysroot
  • subos GCC can compile #include <python3.12/pyconfig.h> successfully
  • OpenPI full dependency install succeeds with Python 3.12 venv

🤖 Generated with Claude Code

…sroot

- Add Python 3.12.13 (cpython-standalone) download URL for Linux x86_64
- In config(), copy include/ headers into subos sysroot so that the
  subos GCC can compile C extensions (evdev, mujoco, dm-tree, etc.)
  without missing pyconfig.h
- Supports multi-version: both 3.12 and 3.13 headers coexist in sysroot
- Enables `xlings use python@3.12` for projects requiring Python 3.12
  (e.g. OpenPI which pins numpy<2.0.0)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Sunrisepeak Sunrisepeak merged commit dc957cb into main Mar 22, 2026
5 checks passed
@Sunrisepeak Sunrisepeak deleted the feat/python-3.12-and-dev-headers branch March 22, 2026 03:15
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.

1 participant