ci: install python on ubuntu
commita69043d51083151c538c3f2da0fc312f8af35edd
authorJiang Xin <zhiyou.jx@alibaba-inc.com>
Fri, 25 Nov 2022 09:59:54 +0000 (25 17:59 +0800)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Sun, 12 Mar 2023 19:31:54 +0000 (12 20:31 +0100)
tree5add4ab2926142d6d0883902aa4006478cdee024
parent79e0626b39a4aa3754ec0719b3f67296ad39e724
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>
ci/install-dependencies.sh
ci/lib.sh