File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 8
8
# ----------------
9
9
# Look for Python and set the output variable 'PYTHON' if found,
10
10
# fail otherwise.
11
+ #
12
+ # As the Python 3 transition happens and PEP 394 isn't updated, we
13
+ # need to cater to systems that don't have unversioned "python" by
14
+ # default. Some systems ship with "python3" by default and perhaps
15
+ # have "python" in an optional package. Some systems only have
16
+ # "python2" and "python3", in which case it's reasonable to prefer the
17
+ # newer version.
11
18
AC_DEFUN ( [ PGAC_PATH_PYTHON] ,
12
- [ PGAC_PATH_PROGS(PYTHON, python)
19
+ [ PGAC_PATH_PROGS(PYTHON, [ python python3 python2 ] )
13
20
if test x"$PYTHON" = x""; then
14
21
AC_MSG_ERROR ( [ Python not found] )
15
22
fi
Original file line number Diff line number Diff line change 9504
9504
9505
9505
if test "$with_python" = yes; then
9506
9506
if test -z "$PYTHON"; then
9507
- for ac_prog in python
9507
+ for ac_prog in python python3 python2
9508
9508
do
9509
9509
# Extract the first word of "$ac_prog", so it can be a program name with args.
9510
9510
set dummy $ac_prog; ac_word=$2
Original file line number Diff line number Diff line change @@ -1517,7 +1517,8 @@ su - postgres
1517
1517
implicitly chosen) determines which variant of the PL/Python
1518
1518
language becomes available. See
1519
1519
<xref linkend="plpython-python23"/>
1520
- for more information. The default is <command>python</command>.
1520
+ for more information. If this is not set, the following are probed
1521
+ in this order: <literal>python python3 python2</literal>.
1521
1522
</para>
1522
1523
</listitem>
1523
1524
</varlistentry>
You can’t perform that action at this time.
0 commit comments