aboutsummaryrefslogtreecommitdiff
path: root/test cases/python
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 /test cases/python
parent4a2530802c8d1d7a92f3f9b4b9683636ba5c92e1 (diff)
downloadmeson-0e7fb07f915b7a2b04df209fbacd92aca19c87af.zip
meson-0e7fb07f915b7a2b04df209fbacd92aca19c87af.tar.gz
meson-0e7fb07f915b7a2b04df209fbacd92aca19c87af.tar.bz2
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 'test cases/python')
-rw-r--r--test cases/python/2 extmodule/meson.build2
-rw-r--r--test cases/python/7 install path/meson.build3
2 files changed, 3 insertions, 2 deletions
diff --git a/test cases/python/2 extmodule/meson.build b/test cases/python/2 extmodule/meson.build
index 8332afd..0794631 100644
--- a/test cases/python/2 extmodule/meson.build
+++ b/test cases/python/2 extmodule/meson.build
@@ -1,5 +1,5 @@
project('Python extension module', 'c',
- default_options : ['buildtype=release', 'werror=true'])
+ default_options : ['buildtype=release', 'werror=true', 'python.bytecompile=-1'])
# Because Windows Python ships only with optimized libs,
# we must build this project the same way.
diff --git a/test cases/python/7 install path/meson.build b/test cases/python/7 install path/meson.build
index 22e33c6..2cac652 100644
--- a/test cases/python/7 install path/meson.build
+++ b/test cases/python/7 install path/meson.build
@@ -1,7 +1,8 @@
project('install path',
default_options: [
+ 'python.bytecompile=-1',
'python.purelibdir=/pure',
- 'python.platlibdir=/plat'
+ 'python.platlibdir=/plat',
]
)