feat: expose the precompiled-mode sources to non-CMake builds

Adds pybind11.get_source_dir() / python -m pybind11 --srcdir and a
srcdir variable in pybind11.pc, so build systems such as Meson can
compile src/pybind11_combined.cpp with PYBIND11_PRECOMPILED defined.

Assisted-by: ClaudeCode:claude-fable-5
This commit is contained in:
Henry Schreiner
2026-08-17 00:50:35 -04:00
committed by Henry Schreiner
parent b8d7622e45
commit 1d3436ada0
6 changed files with 36 additions and 5 deletions
+1
View File
@@ -33,6 +33,7 @@ UV_ARGS = ["--installer=uv"] if HAS_UV else []
PKGCONFIG = """\
prefix=${{pcfiledir}}/../../
includedir=${{prefix}}/include
srcdir=${{prefix}}/share/pybind11/src
Name: pybind11
Description: Seamless operability between C++11 and Python