--- a/meson.build Tue Aug 03 00:37:31 2021 -0500
+++ b/meson.build Thu Sep 23 23:13:30 2021 -0500
@@ -27,7 +27,7 @@
- meson_version : '>=0.41.0')
+ meson_version : '>=0.44.0') parts = meson.project_version().split('-')
@@ -191,11 +191,18 @@
# Check for Python headers
-python_dep = dependency('python2', required : false)
-if not python_dep.found()
- python_dep = dependency('python-2.7', required : false)
+if get_option('python2') + python_dep = dependency('python2', required : false) + if not python_dep.found() + python_dep = dependency('python-2.7', required : false) + if not python_dep.found() + error('failed to find python') -gnt_config.set('USE_PYTHON', python_dep.found())
+gnt_config.set('USE_PYTHON', get_option('python2')) configure_file(output : 'gntconfig.h',
configuration : gnt_config)
@@ -213,13 +220,17 @@
install_dir : join_paths(get_option('includedir'), 'gnt'))
libgnt_inc = include_directories('.')
+libgnt_dependencies= [ncurses, libxml, glib, gobject, gmodule] +if get_option('python2') + libgnt_dependencies += python_dep libgnt_SOURCES + gntmarshal,
version : '@0@.@1@.@2@'.format(gnt_soversion,
- dependencies : [ncurses, libxml, glib, gobject, gmodule, python_dep])
+ dependencies : libgnt_dependencies) libgnt_dep = declare_dependency(
include_directories : libgnt_inc,