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 9699
9699
9700
9700
if test "$with_python" = yes; then
9701
9701
if test -z "$PYTHON"; then
9702
- for ac_prog in python
9702
+ for ac_prog in python python3 python2
9703
9703
do
9704
9704
# Extract the first word of "$ac_prog", so it can be a program name with args.
9705
9705
set dummy $ac_prog; ac_word=$2
Original file line number Diff line number Diff line change @@ -1501,7 +1501,8 @@ su - postgres
1501
1501
implicitly chosen) determines which variant of the PL/Python
1502
1502
language becomes available. See
1503
1503
<xref linkend="plpython-python23"/>
1504
- for more information. The default is <command>python</command>.
1504
+ for more information. If this is not set, the following are probed
1505
+ in this order: <literal>python python3 python2</literal>.
1505
1506
</para>
1506
1507
</listitem>
1507
1508
</varlistentry>
You can’t perform that action at this time.
0 commit comments