--- a/giscanner/meson.build +++ b/giscanner/meson.build @@ -95,29 +95,12 @@ dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep], ) -# https://github.com/mesonbuild/meson/issues/4117 -if host_machine.system() == 'windows' - python_ext_dep = python.dependency() -else - python_ext_dep = python.dependency().partial_dependency(compile_args: true) -endif - -if not python_ext_dep.found() - # For example if Python is 32bit but we require a 64bit variant - error('Python installation not useable') -endif - giscanner_pymod = python.extension_module('_giscanner', ['giscannermodule.c'], link_with: giscanner_lib, c_args: gi_hidden_visibility_cflags + custom_c_args, include_directories : configinc, - dependencies: [ - glib_dep, - gobject_dep, - gio_dep, - gmodule_dep, - python_ext_dep, - ], + dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep], + link_args: '-lpython@PYTHON_VERSION@', install: true, install_dir: giscannerdir, ) --- a/meson.build +++ b/meson.build @@ -4,6 +4,7 @@ default_options: [ 'c_std=gnu99', 'warning_level=2', + 'c_link_args=-lpython@PYTHON_VERSION@', 'buildtype=debugoptimized', ], ) @@ -174,9 +175,6 @@ output: 'config.h' ) -# python headers -cc.check_header('Python.h', dependencies: [python.dependency()], required: true) - # cairo cairo_option = get_option('cairo') if cc.get_id() == 'msvc'