[planner: 2/40] build: Fix python option when missing deps with auto or explicitly disabled
- From: Mart Raudsepp <mraudsepp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [planner: 2/40] build: Fix python option when missing deps with auto or explicitly disabled
- Date: Thu, 3 Jun 2021 16:28:54 +0000 (UTC)
commit a2ad8357d5993b8366f566dfdafff4347e398aed
Author: Mart Raudsepp <leio gentoo org>
Date: Wed Mar 4 10:49:56 2020 +0200
build: Fix python option when missing deps with auto or explicitly disabled
meson.build | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index dc319999..10b2b860 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,7 @@ project('planner',
)
cc = meson.get_compiler('c')
-pygobject_codegen = find_program('pygobject-codegen-2.0')
+pygobject_codegen = find_program('pygobject-codegen-2.0', required: get_option('python'))
i18n = import('i18n')
gnome = import('gnome')
@@ -38,9 +38,11 @@ gnomecanvas_dep = dependency('libgnomecanvas-2.0', version: '>=2.10.0')
gobject_dep = dependency('gobject-2.0')
gtk_dep = dependency('gtk+-2.0', version: '>= 2.24.0')
libxml_dep = dependency('libxml-2.0', version: '>= 2.6.27')
-pygobject_dep = dependency('pygobject-2.0')
+pygobject_dep = dependency('pygobject-2.0', required: get_option('python'))
pygtk_dep = dependency('pygtk-2.0', version: '>= 2.6.0', required: get_option('python'))
-pygtk_defsdir = pygtk_dep.get_pkgconfig_variable('defsdir')
+if pygtk_dep.found()
+ pygtk_defsdir = pygtk_dep.get_pkgconfig_variable('defsdir')
+endif
python = pymod.find_installation('python2', required: get_option('python'))
python_dep = python.dependency()
libplanner_deps = [glib_dep, gmodule_dep, gobject_dep, libxml_dep, m_dep,]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]