Closed nicholasjng closed 9 months ago
@wjakob Could you explain why only CPython>=3.12 is supported for nanobind SABI builds? The oldest Python ABI selectable is 3.2 (with -DPy_LIMITED_API=0x03020000
), is the constraint due to a nanobind implementation detail?
Because nanobind depends on functionality that hasn't become part of the SABI until 3.12.
Summary:
nanobind_example
wheel is SABI 3.12 compliant, tested with python -m abi3audit dist/nanobind_example_..._.whl
.cp312-abi3
tag with either python -m build
or python -m pip wheel
, only using the legacy python setup.py bdist_wheel --py-limited-api=cp312
. This is no doubt my own issue, and should be configurable in the former frontends as well. (Curiously, -C--py-limited-api=cp312
does nothing.)I'm going to merge this for now, and restructure the settings into a helper later.
Still in progress, the extension name is not correct yet (needs to be
.abi3.so
in the SABI case).However, I'm not sure how this is solvable elegantly outside of a completely custom rule implementation for
nanobind_extension
.Usage:
Currently only
cp312
andcp313
are supported as targetable Python ABI versions.