Skip to content

Commit 489ca33

Browse files
committed
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
1 parent e255b64 commit 489ca33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ pyopt = get_option('plpython')
10631063
python3_dep = not_found_dep
10641064
if not pyopt.disabled()
10651065
pm = import('python')
1066-
python3_inst = pm.find_installation(required: pyopt)
1066+
python3_inst = pm.find_installation(python.path(), required: pyopt)
10671067
if python3_inst.found()
10681068
python3_dep = python3_inst.dependency(embed: true, required: pyopt)
10691069
# Remove this check after we depend on Meson >= 1.1.0

0 commit comments

Comments
 (0)