summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2020-01-23 17:56:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-03-10 18:27:13 (GMT)
commit6bb40ed20a34a1c2f49efaef927afb63c4a81d41 (patch)
treedb200fc27425cc12bc1daa73ad213935a3fa7fea
parent7575f4fdecf22cf232975625ec53add3f2b962e4 (diff)
downloadgit-6bb40ed20a34a1c2f49efaef927afb63c4a81d41.zip
git-6bb40ed20a34a1c2f49efaef927afb63c4a81d41.tar.gz
git-6bb40ed20a34a1c2f49efaef927afb63c4a81d41.tar.bz2
ci: use python3 in linux-gcc and osx-gcc and python2 elsewhere
Python2 reached end of life, and we have been preparing our Python scripts to work with Python3. 'git p4', the main in-tree user of Python, has just received a number of compatibility updates. Our other notable Python script 'contrib/svn-fe/svnrdump_sim.py' is only used in 't9020-remote-svn.sh', and is apparently already compatible with both Python2 and 3. Our CI jobs currently only use Python2. We want to make sure that these Python scripts do indeed work with Python3, and we also want to make sure that these scripts keep working with Python2 as well, for the sake of some older LTS/Enterprise setups. Therefore, pick two jobs and use Python3 there, while leaving other jobs to still stick to Python2 for now. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xci/lib.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/ci/lib.sh b/ci/lib.sh
index a90d0dc..c3a8cd2 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -162,6 +162,9 @@ linux-clang|linux-gcc)
if [ "$jobname" = linux-gcc ]
then
export CC=gcc-8
+ MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
+ else
+ MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
fi
export GIT_TEST_HTTPD=true
@@ -182,6 +185,9 @@ osx-clang|osx-gcc)
if [ "$jobname" = osx-gcc ]
then
export CC=gcc-9
+ MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
+ else
+ MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
fi
# t9810 occasionally fails on Travis CI OS X