From 9f09c90f697764f8d1c363c6201e0c51aa399db7 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 7 Sep 2018 10:27:23 +0200 Subject: [PATCH] meson: Don't link against libpython on non-Windows systems see https://github.com/mesonbuild/meson/issues/4117 --- cairo/meson.build | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cairo/meson.build b/cairo/meson.build index 5aa122df..13633e86 100644 --- a/cairo/meson.build +++ b/cairo/meson.build @@ -59,8 +59,15 @@ install_headers( ) install_headers([header_file], subdir: 'pycairo') +# https://github.com/mesonbuild/meson/issues/4117 +if host_machine.system() == 'windows' + python_ext_dep = python_dep +else + python_ext_dep = python_dep.partial_dependency(compile_args: true) +endif + pyext = python.extension_module('_cairo', sources, - dependencies : [python_dep, cairo_dep], + dependencies : [python_ext_dep, cairo_dep], install: true, subdir : 'cairo', c_args: pyext_c_args + main_c_args,