summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2023-11-30 07:22:51 +0100
committerPeter Eisentraut <peter@eisentraut.org>2023-11-30 07:27:54 +0100
commit1f5e38847b26265c15bf367de516b46491c3a7c3 (patch)
tree6d1716e95313078072abbb5c020578cb4136e0aa
parent2d758dca1b31baed43c3f17ea742bee6a9ed7dbd (diff)
meson: Improve/fix Python version selection
When we look for the Python installation using the meson python module, we should make it use the python program previously determined by the 'PYTHON' option. Otherwise, it will just use its own search and the 'PYTHON' option won't affect it. We need this to be able to select the Python installation to build PL/Python against. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/flat/3f5427e8-cef6-474d-ae88-13db1bfdc1a7%40eisentraut.org
-rw-r--r--meson.build2
1 files changed, 1 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 96fc2e139af..80d8aa47285 100644
--- a/meson.build
+++ b/meson.build
@@ -1055,7 +1055,7 @@ pyopt = get_option('plpython')
python3_dep = not_found_dep
if not pyopt.disabled()
pm = import('python')
- python3_inst = pm.find_installation(required: pyopt)
+ python3_inst = pm.find_installation(python.path(), required: pyopt)
if python3_inst.found()
python3_dep = python3_inst.dependency(embed: true, required: pyopt)
# Remove this check after we depend on Meson >= 1.1.0