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 88# ----------------
99# Look for Python and set the output variable 'PYTHON' if found,
1010# 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.
1118AC_DEFUN ( [ PGAC_PATH_PYTHON] ,
12- [ PGAC_PATH_PROGS(PYTHON, python)
19+ [ PGAC_PATH_PROGS(PYTHON, [ python python3 python2 ] )
1320if test x"$PYTHON" = x""; then
1421 AC_MSG_ERROR ( [ Python not found] )
1522fi
Original file line number Diff line number Diff line change 96999699
97009700if test "$with_python" = yes; then
97019701 if test -z "$PYTHON"; then
9702- for ac_prog in python
9702+ for ac_prog in python python3 python2
97039703do
97049704 # Extract the first word of "$ac_prog", so it can be a program name with args.
97059705set dummy $ac_prog; ac_word=$2
Original file line number Diff line number Diff line change @@ -1501,7 +1501,8 @@ su - postgres
15011501 implicitly chosen) determines which variant of the PL/Python
15021502 language becomes available. See
15031503 <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>.
15051506 </para>
15061507 </listitem>
15071508 </varlistentry>
You can’t perform that action at this time.
0 commit comments