Skip to content

Commit 9a0fa17

Browse files
committed
Merge branch 'yz/p4-py3'
Update "git p4" to work with Python 3. * yz/p4-py3: ci: use python3 in linux-gcc and osx-gcc and python2 elsewhere git-p4: use python3's input() everywhere git-p4: simplify regex pattern generation for parsing diff-tree git-p4: use dict.items() iteration for python3 compatibility git-p4: use functools.reduce instead of reduce git-p4: fix freezing while waiting for fast-import progress git-p4: use marshal format version 2 when sending to p4 git-p4: open .gitp4-usercache.txt in text mode git-p4: convert path to unicode before processing them git-p4: encode/decode communication with git for python3 git-p4: encode/decode communication with p4 for python3 git-p4: remove string type aliasing git-p4: change the expansion test from basestring to list git-p4: make python2.7 the oldest supported version
2 parents 4d0e899 + 6bb40ed commit 9a0fa17

File tree

2 files changed

+146
-95
lines changed

2 files changed

+146
-95
lines changed

ci/lib.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ linux-clang|linux-gcc)
162162
if [ "$jobname" = linux-gcc ]
163163
then
164164
export CC=gcc-8
165+
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
166+
else
167+
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
165168
fi
166169

167170
export GIT_TEST_HTTPD=true
@@ -182,6 +185,9 @@ osx-clang|osx-gcc)
182185
if [ "$jobname" = osx-gcc ]
183186
then
184187
export CC=gcc-9
188+
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)"
189+
else
190+
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python2)"
185191
fi
186192

187193
# t9810 occasionally fails on Travis CI OS X

0 commit comments

Comments
 (0)