From 62c269d08859747ba558e90bc98505e6325ef678 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 22 Feb 2023 23:33:51 -0500 Subject: dependencies: add pybind11 custom factory This works with pkg-config and cmake without any special support. The custom factory adds further support for config-tool, via `pybind11-config`. This is useful because the config-tool will work out of the box when pybind11 is installed, but the pkg-config and cmake files are shoved into python's site-packages, which is an unfortunate distribution model and makes it impossible to use in an out of the box manner. It's possible to manually set up the PKG_CONFIG_PATH to detect it anyway, but in case that does not happen, having the config-tool fallback is extremely useful. --- docs/markdown/Dependencies.md | 6 ++++++ docs/markdown/snippets/pybind11_dep.md | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 docs/markdown/snippets/pybind11_dep.md (limited to 'docs') diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md index 88a1dbd..d95b835 100644 --- a/docs/markdown/Dependencies.md +++ b/docs/markdown/Dependencies.md @@ -659,6 +659,12 @@ The `language` keyword may used. `method` may be `auto`, `config-tool` or `pkg-config`. +## Pybind11 + +*(added 1.1.0)* + +`method` may be `auto`, `pkg-config`, `config-tool`, or `cmake`. + ## Python3 Python3 is handled specially by Meson: diff --git a/docs/markdown/snippets/pybind11_dep.md b/docs/markdown/snippets/pybind11_dep.md new file mode 100644 index 0000000..ac19701 --- /dev/null +++ b/docs/markdown/snippets/pybind11_dep.md @@ -0,0 +1,9 @@ +## New pybind11 custom dependency + +`dependency('pybind11')` works with pkg-config and cmake without any special +support, but did not handle the `pybind11-config` script. + +This is useful because the config-tool will work out of the box when pybind11 +is installed, but the pkg-config and cmake files are shoved into python's +site-packages, which makes it impossible to use in an out of the box manner. + -- cgit v1.1