summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2023-02-23 19:34:25 -0800
committerAndres Freund <andres@anarazel.de>2023-02-23 19:34:25 -0800
commit4fc53819a45fe6e7233a69bb279557b2070dcc40 (patch)
tree9a968a2ee418ad4d140943a5c9f475e3bf38ff52 /meson.build
parent05172f1f37496acc13769b8cc0af6e77591be90f (diff)
downloadpostgresql-4fc53819a45fe6e7233a69bb279557b2070dcc40.tar.gz
meson: windows: Fix tmp_install + prefix computation with meson 1.0.1
In d0366bfb3b21 I said: Instead of trying to do this in meson.build, call out to the implementation meson install uses. This isn't pretty, but it's more reliable than what we had before. Unfortunately it was too ugly - to fix a bug, meson 1.0.1 changed the way the meson internal runpython helper works, resulting in the previous sys.argv[] indices not working anymore. Just open-code it - it's just a few characters longer. Committing this quickly to allow ci/cfbot to work with meson 1.0.1 on windows.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index f534704452..656777820c 100644
--- a/meson.build
+++ b/meson.build
@@ -2880,10 +2880,10 @@ if build_system != 'windows'
test_install_location = '@0@@1@'.format(test_install_destdir, dir_prefix)
else
# drives, drive-relative paths, etc make this complicated on windows, call
- # meson's logic for it
+ # into a copy of meson's logic for it
command = [
- meson_bin, meson_args, 'runpython', '-c',
- 'import sys; from mesonbuild.scripts import destdir_join; print(destdir_join(sys.argv[4], sys.argv[5]))',
+ python, '-c',
+ 'import sys; from pathlib import PurePath; d1=sys.argv[1]; d2=sys.argv[2]; print(str(PurePath(d1, *PurePath(d2).parts[1:])))',
test_install_destdir, dir_prefix]
test_install_location = run_command(command, check: true).stdout().strip()
endif