Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

70.14. python3-nanobind-3.1.0

C++17 binding library for Python — pikepdf and CoolProp generate through it

3.1.0-1 · BSD-3-Clause · 0.1 SBU · 1.2 MiB, 98 files · 40_lang, 169 of 186 · ports/core/python/python3-nanobind

Homepage: https://github.com/wjakob/nanobind

Why it is in KDOS. The comment above the 6 ports from python3-scikit-build-core to python3-pybind11 in script/phases/40_lang/packages.d/python.txt:

THE BUILD BACKENDS ARE PORTS, NOT VENDORED WHEELS. numpy and matplotlib build through mesonpy, pybind11, pikepdf and coolprop through scikit-build-core, and the rest through hatchling or setuptools. Under pip's build isolation each would fetch its backend from PyPI — whose own chain ends at the ninja wrapper, whose sdist COMPILES CMAKE FROM SOURCE. This tree has cmake, ninja and meson already. 30_foundation installs flit-core, hatchling, poetry-core, setuptools-scm and what they build with.

Depends on: python3, python3-pip, python3-scikit-build-core, cmake, ninja.

Required by (3): coolprop, openvdb, python3-pikepdf.

Sources: python3-nanobind-3.1.0.tar.gz (1.1 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/40_lang/phase.env && kpkg install python3-nanobind'

build.sh:

pip3 install --ignore-installed --no-deps --no-index --no-build-isolation --root=$PKG --prefix=/usr .

Directories: /usr/lib/python3.14/site-packages/nanobind, /usr/lib/python3.14/site-packages/nanobind-3.1.0.dist-info, /usr/share/licenses/python3-nanobind.