diff options
author | Jiang Xin <zhiyou.jx@alibaba-inc.com> | 2022-11-25 10:59:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-11-27 01:33:43 +0100 |
commit | 0d3507f3e7b74ccbaa6f1ddc282cf467cce0e102 (patch) | |
tree | 86d39a626db4f7ec673b363a05e47c8666c97aef /ci/lib.sh | |
parent | ci: use the same version of p4 on both Linux and macOS (diff) | |
download | git-0d3507f3e7b74ccbaa6f1ddc282cf467cce0e102.tar.xz git-0d3507f3e7b74ccbaa6f1ddc282cf467cce0e102.zip |
ci: install python on ubuntu
Python is missing from the default ubuntu-22.04 runner image, which
prevents git-p4 from working. To install python on ubuntu, we need
to provide the correct package names:
* On Ubuntu 18.04 (bionic), "/usr/bin/python2" is provided by the
"python" package, and "/usr/bin/python3" is provided by the "python3"
package.
* On Ubuntu 20.04 (focal) and above, "/usr/bin/python2" is provided by
the "python2" package which has a different name from bionic, and
"/usr/bin/python3" is provided by "python3".
Since the "ubuntu-latest" runner image has a higher version, its
safe to use "python2" or "python3" package name.
Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rwxr-xr-x | ci/lib.sh | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -232,12 +232,12 @@ ubuntu-*) break fi - if [ "$jobname" = linux-gcc ] + PYTHON_PACKAGE=python2 + if test "$jobname" = linux-gcc then - MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python3" - else - MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python2" + PYTHON_PACKAGE=python3 fi + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE" export GIT_TEST_HTTPD=true |