diff options
Diffstat (limited to 'docs/markdown/Python-module.md')
-rw-r--r-- | docs/markdown/Python-module.md | 58 |
1 files changed, 31 insertions, 27 deletions
diff --git a/docs/markdown/Python-module.md b/docs/markdown/Python-module.md index d99b36a..4aff4c9 100644 --- a/docs/markdown/Python-module.md +++ b/docs/markdown/Python-module.md @@ -34,10 +34,10 @@ If provided, it can be: - A path, eg `/usr/local/bin/python3.4m` -- One of `python2` or `python3`: in either case, the module will try some - alternative names: `py -2` or `py -3` on Windows, and `python` everywhere. - In the latter case, it will check whether the version provided by the - sysconfig module matches the required major version +- One of `python2` or `python3`: in either case, the module will try + some alternative names: `py -2` or `py -3` on Windows, and `python` + everywhere. In the latter case, it will check whether the version + provided by the sysconfig module matches the required major version Keyword arguments are the following: @@ -83,8 +83,9 @@ shared_module py_installation.extension_module(module_name, list_of_sources, ... Create a `shared_module` target that is named according to the naming conventions of the target platform. -All positional and keyword arguments are the same as for [shared_module], -excluding `name_suffix` and `name_prefix`, and with the addition of the following: +All positional and keyword arguments are the same as for +[shared_module], excluding `name_suffix` and `name_prefix`, and with +the addition of the following: - `subdir`: By default, meson will install the extension module in the relevant top-level location for the python installation, eg @@ -92,8 +93,9 @@ excluding `name_suffix` and `name_prefix`, and with the addition of the followin it will be appended to that location. This keyword argument is mutually exclusive with `install_dir` -`extension_module` does not add any dependencies to the library so user may -need to add `dependencies : py_installation.dependency()`, see [][`dependency()`]. +`extension_module` does not add any dependencies to the library so +user may need to add `dependencies : py_installation.dependency()`, +see [][`dependency()`]. **Returns**: a [buildtarget object] @@ -103,12 +105,13 @@ need to add `dependencies : py_installation.dependency()`, see [][`dependency()` python_dependency py_installation.dependency(...) ``` -This method accepts no positional arguments, and the same keyword arguments as -the standard [dependency] function. It also supports the following keyword -argument: +This method accepts no positional arguments, and the same keyword +arguments as the standard [dependency] function. It also supports the +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. +- `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. **Returns**: a [python dependency][`python_dependency` object] @@ -120,14 +123,14 @@ void py_installation.install_sources(list_of_files, ...) Install actual python sources (`.py`). -All positional and keyword arguments are the same as for [install_data], -with the addition of the following: +All positional and keyword arguments are the same as for +[install_data], with the addition of the following: -- `pure`: On some platforms, architecture independent files are expected - to be placed in a separate directory. However, if the python sources - should be installed alongside an extension module built with this - module, this keyword argument can be used to override that behaviour. - Defaults to `true` +- `pure`: On some platforms, architecture independent files are + expected to be placed in a separate directory. However, if the + python sources should be installed alongside an extension module + built with this module, this keyword argument can be used to + override that behaviour. Defaults to `true` - `subdir`: See documentation for the argument of the same name to [][`extension_module()`] @@ -140,8 +143,8 @@ string py_installation.get_install_dir(...) Retrieve the directory [][`install_sources()`] will install to. -It can be useful in cases where `install_sources` cannot be used directly, -for example when using [configure_file]. +It can be useful in cases where `install_sources` cannot be used +directly, for example when using [configure_file]. This function accepts no arguments, its keyword arguments are the same as [][`install_sources()`]. @@ -223,14 +226,15 @@ a non-existing variable will cause a fatal error. bool py_installation.has_variable(variable_name) ``` -**Returns**: true if a variable named `variable_name` can be retrieved with -[][`get_variable()`], false otherwise. +**Returns**: true if a variable named `variable_name` can be retrieved +with [][`get_variable()`], false otherwise. ## `python_dependency` object -This [dependency object] subclass will try various methods to obtain the -compiler and linker arguments, starting with pkg-config then potentially -using information obtained from python's `sysconfig` module. +This [dependency object] subclass will try various methods to obtain +the compiler and linker arguments, starting with pkg-config then +potentially using information obtained from python's `sysconfig` +module. It exposes the same methods as its parent class. |