@matheusbsbs / matheus-bagliano / commits / 6bb40ed20a
Fork 0

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>

SZEDER Gábor committed Jan 23, 2020 at 18:56 UTC 6bb40ed20a34a1c2f49efaef927afb63c4a81d41
1 file changed +6
ci/lib.sh
+6
@@ -162,6 +162,9 @@ linux-clang|linux-gcc)
162 if [ "$jobname" = linux-gcc ]
163 then
164 export CC=gcc-8
165 + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
166 + else
167 + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
168 fi
169
170 export GIT_TEST_HTTPD=true
@@ -182,6 +185,9 @@ osx-clang|osx-gcc)
185 if [ "$jobname" = osx-gcc ]
186 then
187 export CC=gcc-9
188 + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
189 + else
190 + MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
191 fi
192
193 # t9810 occasionally fails on Travis CI OS X