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

Commitcd18731

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 parent10ab852 commitcd18731

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
@@ -8031,7 +8031,7 @@ fi
80318031

80328032
iftest"$with_python" = yes;then
80338033
iftest -z"$PYTHON";then
8034-
forac_progin python
8034+
forac_progin python python3 python2
80358035
do
80368036
# Extract the first word of "$ac_prog", so it can be a program name with args.
80378037
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
@@ -1473,7 +1473,8 @@ su - postgres
14731473
<![%standalone-include[the <application>PL/Python</>
14741474
documentation]]>
14751475
<![%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>.
14771478
</para>
14781479
</listitem>
14791480
</varlistentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp