summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-07-11 18:49:27 +0200
committerChristoph Reiter <reiter.christoph@gmail.com>2018-07-11 20:44:52 +0200
commit2dbf8f4ea4992ca33c272786f860d7fc291ba89b (patch)
treefca28df47c9d2e3afc991c19de68fe80db477e18 /meson.build
parent4542321c383304807228f204de600aa64944c87e (diff)
downloadgobject-introspection-2dbf8f4ea4992ca33c272786f860d7fc291ba89b.tar.gz
meson: Add a "python" option to make the python to build against configurable
This allows us to build with Python 2 and run tests with it. This requires the new "python" meson module which was added in 0.46.0 so bump the required meson version (glib needs a newer one anyway). Also fixes a small test error under Python 2.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index 07446553..f5d7561a 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project('gobject-introspection', 'c',
version: '1.57.1',
- meson_version: '>= 0.42.0',
+ meson_version: '>= 0.46.0',
default_options: [
'warning_level=1',
'buildtype=debugoptimized',
@@ -12,8 +12,8 @@ gi_versions = meson.project_version().split('.')
configinc = include_directories('.')
-py3 = import('python3')
-python3 = py3.find_python()
+pymod = import('python')
+python = pymod.find_installation(get_option('python'))
cc = meson.get_compiler('c')
config = configuration_data()