diff options
author | Ting-Wei Lan <lantw@src.gnome.org> | 2020-03-21 22:13:57 +0800 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2020-03-24 15:14:11 +0000 |
commit | 76c23503ed1002d3aad0118795006fe2128006ae (patch) | |
tree | 62b51b1b298b3ca9add70f0deae40cc69c8483e5 /gusb/meson.build | |
parent | 16e73d7bfcd9ffb38e9a4ef30ca90c2c8038c2af (diff) | |
download | gusb-76c23503ed1002d3aad0118795006fe2128006ae.tar.gz |
generate-version-script: Don't hard-code the path of python3
Python can be installed in different directories on different operating
systems, so we can't hard-code the path of it. Instead, use meson to
find it to avoid 'no such file or directory' error on the bad path.
Diffstat (limited to 'gusb/meson.build')
-rw-r--r-- | gusb/meson.build | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gusb/meson.build b/gusb/meson.build index 10a6f53..28ca3c6 100644 --- a/gusb/meson.build +++ b/gusb/meson.build @@ -142,6 +142,9 @@ libgusb_girtarget = gnome.generate_gir(gusb, libgusb_gir = libgusb_girtarget[0] libgusb_typelib = libgusb_girtarget[1] +pymod = import('python') +py_installation = pymod.find_installation('python3') + # Verify the map file is correct -- note we can't actually use the generated # file for two reasons: # @@ -154,6 +157,7 @@ mapfile_target = custom_target('gusb_mapfile', input: libgusb_girtarget[0], output: 'libgusb.ver', command: [ + py_installation, join_paths(meson.source_root(), 'contrib', 'generate-version-script.py'), 'LIBGUSB', '@INPUT@', |