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

Commit7291733

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 parent0acb3bc commit7291733

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
@@ -9699,7 +9699,7 @@ fi
96999699

97009700
if 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
97039703
do
97049704
# Extract the first word of "$ac_prog", so it can be a program name with args.
97059705
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
@@ -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>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp