diff options
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Builtin-options.md | 20 | ||||
-rw-r--r-- | docs/markdown/CMake-module.md | 1 | ||||
-rw-r--r-- | docs/markdown/Wayland-module.md | 64 | ||||
-rw-r--r-- | docs/markdown/_Sidebar.md | 1 | ||||
-rw-r--r-- | docs/markdown/snippets/cmake_configure_package_config_dict.md | 5 | ||||
-rw-r--r-- | docs/markdown/snippets/python_module_env.md | 9 | ||||
-rw-r--r-- | docs/markdown/snippets/wayland-module.md | 4 |
7 files changed, 100 insertions, 4 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index db3c3e8..c8e98dd 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -271,10 +271,11 @@ name with the module name: `-D<module>.<option>=<value>` (e.g. `-Dpython.platlib ### Python module -| Option | Default value | Possible values | Description | -| ------ | ------------- | --------------- | ----------- | -| platlibdir | | Directory path | Directory for site-specific, platform-specific files (Since 0.60.0) | -| purelibdir | | Directory path | Directory for site-specific, non-platform-specific files (Since 0.60.0) | +| Option | Default value | Possible values | Description | +| ------ | ------------- | ----------------- | ----------- | +| install_env | prefix | {auto,prefix,system,venv} | Which python environment to install to (Since 0.62.0) | +| platlibdir | | Directory path | Directory for site-specific, platform-specific files (Since 0.60.0) | +| purelibdir | | Directory path | Directory for site-specific, non-platform-specific files (Since 0.60.0) | *Since 0.60.0* `python.platlibdir` and `python.purelibdir` options are used by python module methods `python.install_sources()` and `python.get_install_dir()`. @@ -283,3 +284,14 @@ relative to the installation `prefix`, which will often result in installed pyth modules to not be found by the interpreter unless `prefix` is `/usr` on Linux, or for example `C:\Python39` on Windows. These options can be absolute paths outside of `prefix`. + +*Since 0.62.0* The `python.install_env` option is used to detect the correct +installation path. Setting to `system` will avoid making the paths relative to +`prefix` and instead use the global site-packages of the selected python +interpreter directly, even if it is a venv. Setting to `venv` will instead use +the paths for the virtualenv the python found installation comes from (or fail +if it is not a virtualenv). Setting to `auto` will check if the found +installation is a virtualenv, and use `venv` or `system` as appropriate (but +never `prefix`). This option is mutually exclusive with the `platlibdir`/`purelibdir`. + +For backwards compatibility purposes, the default `install_env` is `prefix`. diff --git a/docs/markdown/CMake-module.md b/docs/markdown/CMake-module.md index 8e6c4e9..a5c0c7e 100644 --- a/docs/markdown/CMake-module.md +++ b/docs/markdown/CMake-module.md @@ -262,6 +262,7 @@ the `configuration` parameter. * `input`: the template file where that will be treated for variable substitutions contained in `configuration`. * `install_dir`: optional installation directory, it defaults to `$(libdir)/cmake/$(name)`. * `configuration`: a `configuration_data` object that will be used for variable substitution in the template file. + *Since 0.62.0* it can take a dictionary instead. Example: diff --git a/docs/markdown/Wayland-module.md b/docs/markdown/Wayland-module.md new file mode 100644 index 0000000..d30627c --- /dev/null +++ b/docs/markdown/Wayland-module.md @@ -0,0 +1,64 @@ +# Unstable Wayland Module + +This module is available since version 0.62.0. + +This module provides helper functions to find wayland protocol +xmls and to generate .c and .h files using wayland-scanner + +**Note**: this module is unstable. It is only provided as a technology +preview. Its API may change in arbitrary ways between releases or it +might be removed from Meson altogether. + +## Quick Usage + +```meson +project('hello-wayland', 'c') + +wl_dep = dependency('wayland-client') +wl_mod = import('unstable-wayland') + +xml = wl_mod.find_protocol('xdg-shell') +xdg_shell = wl_mod.scan_xml(xml) + +executable('hw', 'main.c', xdg_shell, dependencies : wl_dep) +``` + +## Methods + +### find_protocol + +```meson +xml = wl_mod.find_protocol( + 'xdg-decoration', + state : 'unstable', + version : 1, +) +``` +This function requires one positional argument: the protocol base name. +- `state` Optional arg that specifies the current state of the protocol. +Either stable, staging, or unstable. +The default is stable. +- `version` The backwards incompatible version number. +Required for staging or unstable. An error is raised for stable. + +### scan_xml +```meson +generated = wl_mod.scan_xml( + 'my-protocol.xml', + side : 'client', + scope : 'private', +) +``` +This function accepts one or more arguments of either string or file type. + +- `side` Optional arg that specifies if client or server side code is generated. +The default is client side. +- `scope` Optional arg that specifies the scope of the generated code. +Either public or private. +The default is private. + + +## Links +- [Official Wayland Documentation](https://wayland.freedesktop.org/docs/html/) +- [Wayland GitLab](https://gitlab.freedesktop.org/wayland) +- [Wayland Book](https://wayland-book.com/) diff --git a/docs/markdown/_Sidebar.md b/docs/markdown/_Sidebar.md index 0ca1762..ce73d5a 100644 --- a/docs/markdown/_Sidebar.md +++ b/docs/markdown/_Sidebar.md @@ -13,3 +13,4 @@ * [i18n](i18n-module.md) * [pkgconfig](Pkgconfig-module.md) * [rust](Rust-module.md) +* [wayland](Wayland-module.md) diff --git a/docs/markdown/snippets/cmake_configure_package_config_dict.md b/docs/markdown/snippets/cmake_configure_package_config_dict.md new file mode 100644 index 0000000..253a887 --- /dev/null +++ b/docs/markdown/snippets/cmake_configure_package_config_dict.md @@ -0,0 +1,5 @@ +## cmake.configure_package_config_file can now take a dict + +The `configuration` kwarg of the `configure_package_config_file()` function +from the `cmake` module can now take a dict object, just like the regular +`configure_file()` function. diff --git a/docs/markdown/snippets/python_module_env.md b/docs/markdown/snippets/python_module_env.md new file mode 100644 index 0000000..87a156d --- /dev/null +++ b/docs/markdown/snippets/python_module_env.md @@ -0,0 +1,9 @@ +## New option to choose python installation environment + +It is now possible to specify `-Dpython.install_env` and choose how python modules are installed. + +- `venv`: assume that a virtualenv is active and install to that +- `system`: install to the global site-packages of the selected interpreter + (the one that the venv module calls --system-site-packages) +- `prefix`: preserve existing behavior +- `auto`: autodetect whether to use venv or system diff --git a/docs/markdown/snippets/wayland-module.md b/docs/markdown/snippets/wayland-module.md new file mode 100644 index 0000000..cd5e5dc --- /dev/null +++ b/docs/markdown/snippets/wayland-module.md @@ -0,0 +1,4 @@ +## New unstable wayland module + +This module can search for protocol xml files from the wayland-protocols +package, and generate .c and .h files using wayland-scanner. |