aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-06-11 10:25:36 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2019-06-12 14:13:20 +0300
commit15ab1f64f964ce5d3ab254b5698f7325754cc2b7 (patch)
tree682332298358e35cc40e42819c0e5f7fe1c958de /docs
parent3c461bcf4fe561dd77ba80420c78936b92f07c1b (diff)
downloadmeson-15ab1f64f964ce5d3ab254b5698f7325754cc2b7.zip
meson-15ab1f64f964ce5d3ab254b5698f7325754cc2b7.tar.gz
meson-15ab1f64f964ce5d3ab254b5698f7325754cc2b7.tar.bz2
modules/python: add a modules keyword argument
This mirrors the modules keyword argument that some dependencies (such as qt and llvm) take. This allows an easier method to determine if modules are installed.
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Python-module.md2
-rw-r--r--docs/markdown/snippets/python_find_installation_modules.md9
2 files changed, 11 insertions, 0 deletions
diff --git a/docs/markdown/Python-module.md b/docs/markdown/Python-module.md
index edd10ba..6f9a764 100644
--- a/docs/markdown/Python-module.md
+++ b/docs/markdown/Python-module.md
@@ -51,6 +51,8 @@ Keyword arguments are the following:
- `disabler`: if `true` and no python installation can be found, return a
[disabler object](Reference-manual.md#disabler-object) instead of a not-found object.
*Since 0.49.0*
+- `modules`: a list of module names that this python installation must have.
+ *Since 0.51.0*
**Returns**: a [python installation][`python_installation` object]
diff --git a/docs/markdown/snippets/python_find_installation_modules.md b/docs/markdown/snippets/python_find_installation_modules.md
new file mode 100644
index 0000000..a3719f2
--- /dev/null
+++ b/docs/markdown/snippets/python_find_installation_modules.md
@@ -0,0 +1,9 @@
+## New modules kwarg for python.find_installation
+
+This mirrors the modules argument that some kinds of dependencies (such as
+qt, llvm, and cmake based dependencies) take, allowing you to check that a
+particular module is available when getting a python version.
+
+```meson
+py = import('python').find_installation('python3', modules : ['numpy'])
+``` \ No newline at end of file