From 1acc0ec664a93bf6e4a20aee26e166cf7b473cd8 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Wed, 15 Feb 2017 10:48:58 -0300 Subject: [PATCH] python: Add an option to set where to install pygi overrides --- meson.build | 6 +++++- meson_options.txt | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 meson_options.txt diff --git a/meson.build b/meson.build index 5c05bc1869..9de435ac4c 100644 --- a/meson.build +++ b/meson.build @@ -24,10 +24,14 @@ python_dep = dependency('python3') python = find_program('python3') pythondetector = find_program('pythondetector') py_so_suffix = run_command(pythondetector, '--sosuffix').stdout().strip() -pygi_override_dir = run_command(pythondetector, '--pygi-overridedir').stdout().strip() python_abi_flags = run_command(pythondetector, '--abiflags').stdout().strip() pylib_loc = run_command(pythondetector, '--libloc').stdout().strip() assert(pylib_loc != 'None', 'Python dynamic library path could not be determined') +pygi_override_dir = get_option('pygi-overrides-dir') +if pygi_override_dir == '' + pygi_override_dir = run_command(pythondetector, '--pygi-overridedir').stdout().strip() +endif +message('pygobject overrides directory ' + pygi_override_dir) pylib_suffix = 'so' if host_machine.system() == 'windows' diff --git a/meson_options.txt b/meson_options.txt new file mode 100644 index 0000000000..b25017965b --- /dev/null +++ b/meson_options.txt @@ -0,0 +1,2 @@ +option('pygi-overrides-dir', type : 'string', value : '', + description: 'Path to pygobject overrides directory')