Make python modules dependency detection explicit

sdbusplus requires python modules like infection, mako & pyyaml
and in the current state, it checks for those dependency while it
tries to compile the example and fails at the following step.

example/meson.build:48:0: ERROR: Command "sdbus++-gendir --tool
sdbus++ --output /sdbusplus/build/example net" failed with status 1.

And we need to check the meson logs to figure out that a python
module is missing.

The intent behind this commit is to leverage the python module
support in meson to make the dependency check explicit and clear.

Tested :

Tested this both on ubuntu & fedora
1. Without required packages
Program python3 (inflection, yaml, mako) found: NO
meson.build:17:0: ERROR: python3 is missing modules: inflection, yaml, mako

2. With required packages
Program python3 (inflection, yaml, mako) found: YES (/usr/bin/python3) modules: inflection, yaml, mako

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I3a03f7d04bb843641757bcaed599125087d5ca4f
diff --git a/meson.build b/meson.build
index b78a71a..0a214e2 100644
--- a/meson.build
+++ b/meson.build
@@ -12,6 +12,15 @@
 )
 
 libsystemd_pkg = dependency('libsystemd')
+
+python = import('python')
+python_bin = python.find_installation('python3', modules:['inflection', 'yaml', 'mako'])
+
+if not python_bin.found()
+  error('No valid python3 installation found')
+endif
+
+
 root_inc = include_directories('include')
 
 libsdbusplus_src = files(