Skip to content

docs: build the CPython example with CMake - #121

Merged
henryiii merged 1 commit into
mainfrom
docs/cpython-cmake
Nov 10, 2026
Merged

henryiii merged 1 commit into
mainfrom
docs/cpython-cmake

Conversation

@henryiii

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

The week 9 CPython notebook built its extension with setup.py build_ext --inplace, but setuptools is not a declared dependency. It now uses CMake's python_add_library, the same tool as the pybind11 notebook that follows.

  • The limited API section and exercise now use Development.SABIModule and USE_SABI 3.11, which need CMake 3.26, so the floor in pixi.toml and environment.yml goes from 3.18 to 3.26.
  • The macOS LIBRARY_PATH workaround cell is removed. The notebook runs without it on one macOS machine; other setups are not tested.

I also built the limited API variant by hand: it produces pysimple.abi3.so and imports correctly.

Replace the setuptools setup.py with python_add_library, and describe
the limited API through USE_SABI. Raise the CMake floor to 3.26.

Assisted-by: ClaudeCode:claude-fable-5-2
@henryiii
henryiii merged commit c6caa11 into main Nov 10, 2026
4 checks passed
@henryiii
henryiii deleted the docs/cpython-cmake branch November 10, 2026 19:06
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