Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3d498c6

Browse files
committed
configure: Update python search order
Some systems don't ship with "python" by default anymore, only"python3" or "python2" or some combination, so include those in theconfigure search.Discussion:https://www.postgresql.org/message-id/flat/1457.1543184081%40sss.pgh.pa.us#c9cc1199338fd6a257589c6dcea6cf8d
1 parentf285f23 commit3d498c6

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

‎config/python.m4

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@
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.
1118
AC_DEFUN([PGAC_PATH_PYTHON],
12-
[PGAC_PATH_PROGS(PYTHON, python)
19+
[PGAC_PATH_PROGS(PYTHON,[python python3 python2])
1320
if test x"$PYTHON" = x""; then
1421
AC_MSG_ERROR([Python not found])
1522
fi

‎configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9504,7 +9504,7 @@ fi
95049504

95059505
if test "$with_python" = yes; then
95069506
if test -z "$PYTHON"; then
9507-
for ac_prog in python
9507+
for ac_prog in python python3 python2
95089508
do
95099509
# Extract the first word of "$ac_prog", so it can be a program name with args.
95109510
set dummy $ac_prog; ac_word=$2

‎doc/src/sgml/installation.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,8 @@ su - postgres
15171517
implicitly chosen) determines which variant of the PL/Python
15181518
language becomes available. See
15191519
<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>.
15211522
</para>
15221523
</listitem>
15231524
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp