Skip to content

Commit 1f5e388

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 2d758dc commit 1f5e388

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
@@ -1055,7 +1055,7 @@ pyopt = get_option('plpython')
10551055
python3_dep = not_found_dep
10561056
if not pyopt.disabled()
10571057
pm = import('python')
1058-
python3_inst = pm.find_installation(required: pyopt)
1058+
python3_inst = pm.find_installation(python.path(), required: pyopt)
10591059
if python3_inst.found()
10601060
python3_dep = python3_inst.dependency(embed: true, required: pyopt)
10611061
# Remove this check after we depend on Meson >= 1.1.0

0 commit comments

Comments
 (0)