File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 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 8031
8031
8032
8032
if test " $with_python " = yes; then
8033
8033
if test -z " $PYTHON " ; then
8034
- for ac_prog in python
8034
+ for ac_prog in python python3 python2
8035
8035
do
8036
8036
# Extract the first word of "$ac_prog", so it can be a program name with args.
8037
8037
set dummy $ac_prog ; ac_word=$2
Original file line number Diff line number Diff line change @@ -1473,7 +1473,8 @@ su - postgres
1473
1473
<![%standalone-include[the <application>PL/Python</>
1474
1474
documentation]]>
1475
1475
<![%standalone-ignore[<xref linkend="plpython-python23">]]>
1476
- for more information. The default is <command>python</command>.
1476
+ for more information. If this is not set, the following are probed
1477
+ in this order: <literal>python python3 python2</literal>.
1477
1478
</para>
1478
1479
</listitem>
1479
1480
</varlistentry>
You can’t perform that action at this time.
0 commit comments