aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-02-22 09:34:20 -0500
committerXavier Claessens <xclaesse@gmail.com>2022-02-28 09:03:27 -0500
commit79c6075b560dbf1c3e4e0b30f1c472dc2086421e (patch)
tree7e306b975b1c293fbf1eb88dab1756ef127b4f92 /docs/markdown
parentc4b8c23eb1dac4b5a556cbd9e7b16bae52bb9244 (diff)
downloadmeson-79c6075b560dbf1c3e4e0b30f1c472dc2086421e.zip
meson-79c6075b560dbf1c3e4e0b30f1c472dc2086421e.tar.gz
meson-79c6075b560dbf1c3e4e0b30f1c472dc2086421e.tar.bz2
devenv: Set PYTHONPATH where we install python modules
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Commands.md9
-rw-r--r--docs/markdown/snippets/devenv.md5
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/markdown/Commands.md b/docs/markdown/Commands.md
index d53f651..2dbe79b 100644
--- a/docs/markdown/Commands.md
+++ b/docs/markdown/Commands.md
@@ -311,5 +311,14 @@ These variables are set in environment in addition to those set using `meson.add
schemas is compiled. This is automatically set when using `gnome.compile_schemas()`.
Note that this requires GLib >= 2.64 when `gnome.compile_schemas()` is used in
more than one directory.
+- `PYTHONPATH` *Since 0.62.0* includes every directory where a python module is being
+ installed using [`python.install_sources()`](Python-module.md#install_sources)
+ and [`python.extension_module()`](Python-module.md#extension_module). Python
+ modules installed by other means, such as `install_data()` or `install_subdir()`,
+ will not be included and should be added to `PYTHONPATH` manually using
+ [`meson.add_devenv()`](Reference-manual_builtin_meson.md#mesonadd_devenv).
+ Note that when modules are installed into subdirectories the source tree
+ layout must match the installed tree layout otherwise `import subdir.mod`
+ cannot work.
{{ devenv_arguments.inc }}
diff --git a/docs/markdown/snippets/devenv.md b/docs/markdown/snippets/devenv.md
new file mode 100644
index 0000000..0d18889
--- /dev/null
+++ b/docs/markdown/snippets/devenv.md
@@ -0,0 +1,5 @@
+## `PYTHONPATH` automatically defined in `meson devenv`
+
+`PYTHONPATH` now includes every directory where a python module is being
+installed using [`python.install_sources()`](Python-module.md#install_sources)
+and [`python.extension_module()`](Python-module.md#extension_module).