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

70.17. python3-pybind11-3.1.0

C++11 bindings — matplotlib and scipy generate through it

3.1.0-1 · BSD-3-Clause · 0.1 SBU · 1.2 MiB, 88 files · 40_lang, 172 of 186 · ports/core/python/python3-pybind11

Homepage: https://pypi.org/project/pybind11/

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.

pybind11 is a header-only C++ library for exposing C++ code to Python, with the CMake and setuptools glue to build such a module. matplotlib, scipy, freecad, gnuradio and the other ports that name it compile their bindings against its headers. It builds with scikit-build-core, which is the python3-scikit-build-core port.

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

Required by (16): audiotube, freecad, gnuradio, gr-funcube, gr-iqbal, gr-osmosdr, matplotlib, netgen, nextpnr, openimageio, python3-contourpy, python3-iminuit, python3-pillow, python3-pyuvula, scipy, uhd.

Sources: python3-pybind11-3.1.0.tar.gz (589.6 KiB). 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-pybind11'

build.sh:

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

Programs: pybind11-config.

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