From: Wook Song Date: Mon, 7 Sep 2020 05:45:18 +0000 (+0900) Subject: [Meson] Use python3-embed when the version of given python3 is 3.8 X-Git-Tag: accepted/tizen/unified/20201027.124817~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03dd35f4d45e97d69717afbf84f6f1b73c28e9e2;p=platform%2Fupstream%2Fnnstreamer.git [Meson] Use python3-embed when the version of given python3 is 3.8 python3.pc no longer provides the Libs section required to use Python C-API since v3.8. To resolve it, this patch modifies the meson build script to change a dependency declaration on python3 to python3-embed when the version of a given python is upper than v3.8. Signed-off-by: Wook Song --- diff --git a/meson.build b/meson.build index 0653f1c..86ba476 100644 --- a/meson.build +++ b/meson.build @@ -355,7 +355,10 @@ endif # Check python 3.x python3_dep = dependency('python3', required: get_option('python3-support')) if python3_dep.found() - + if python3_dep.version().version_compare('>= 3.8') + # The name of .pc file provides C/CXX/LD_FLAGS for Python C API has been changed since v3.8 + python3_dep = dependency('python3-embed', required: get_option('python3-support')) + endif python3_inc_args = [] python3_inc_args += run_command(pg_pkgconfig, ['python3', '--cflags']).stdout().strip().split() python3_inc_args += run_command('python3', ['-c', 'import site\nfor i in site.getsitepackages(): print("-I" + i + "/numpy/core/include")']).stdout().strip().split()