summaryrefslogtreecommitdiff
path: root/docs/markdown/Builtin-options.md
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-09-05 21:12:56 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-05-02 19:28:35 -0400
commit0e7fb07f915b7a2b04df209fbacd92aca19c87af (patch)
tree6ac78a24a7a2682e5ec49e69e9bf56a09a9bf68c /docs/markdown/Builtin-options.md
parent4a2530802c8d1d7a92f3f9b4b9683636ba5c92e1 (diff)
downloadmeson-0e7fb07f915b7a2b04df209fbacd92aca19c87af.tar.gz
python module: add an automatic byte-compilation step
For all source `*.py` files installed via either py.install_sources() or an `install_dir: py.get_install_dir()`, produce `*.pyc` files at install time. Controllable via a module option.
Diffstat (limited to 'docs/markdown/Builtin-options.md')
-rw-r--r--docs/markdown/Builtin-options.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md
index c0a8a0de2..276479845 100644
--- a/docs/markdown/Builtin-options.md
+++ b/docs/markdown/Builtin-options.md
@@ -351,6 +351,7 @@ install prefix. For example: if the install prefix is `/usr` and the
| Option | Default value | Possible values | Description |
| ------ | ------------- | ----------------- | ----------- |
+| bytecompile | 0 | integer from -1 to 2 | What bytecode optimization level to use (Since 1.2.0) |
| 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) |
@@ -373,3 +374,13 @@ 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`.
+
+*Since 1.2.0* The `python.bytecompile` option can be used to enable compiling
+python bytecode. Bytecode has 3 optimization levels:
+
+- 0, bytecode without optimizations
+- 1, bytecode with some optimizations
+- 2, bytecode with some more optimizations
+
+To this, Meson adds level `-1`, which is to not attempt to compile bytecode at
+all.