aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/Python-module.md2
-rw-r--r--mesonbuild/modules/python.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/docs/markdown/Python-module.md b/docs/markdown/Python-module.md
index 20eae1a..6f4120d 100644
--- a/docs/markdown/Python-module.md
+++ b/docs/markdown/Python-module.md
@@ -112,6 +112,8 @@ following keyword argument:
- `embed`: *(since 0.53.0)* If true, Meson will try to find a python
dependency that can be used for embedding python into an
application.
+- `disabler` *(since 0.60.0)*: if `true` and the dependency couldn't be found,
+ returns a [disabler object](#disabler-object) instead of a not-found dependency.
**Returns**: a [python dependency][`python_dependency` object]
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index d03f951..f25957d 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -458,6 +458,7 @@ class PythonInstallation(ExternalProgramHolder):
return self.interpreter.func_shared_module(None, args, kwargs)
+ @disablerIfNotFound
@permittedKwargs(permitted_dependency_kwargs | {'embed'})
@FeatureNewKwargs('python_installation.dependency', '0.53.0', ['embed'])
@noPosargs