Update dist_install test to work around Python issue

googletest uses a Python script in its build which is not compatible
with Python 3. Unfortunately we can't easily upgrade googletest right
now, so this commit works around the problem by putting a python symlink
pointing to Python 2 in the $PATH.
pull/9021/head
Adam Cozzette 3 years ago
parent 151e632bac
commit 0e7a35f24b
  1. 12
      tests.sh

@ -88,6 +88,18 @@ build_cpp_distcheck() {
}
build_dist_install() {
# Create a symlink pointing to python2 and put it at the beginning of $PATH.
# This is necessary because the googletest build system involves a Python
# script that is not compatible with Python 3. More recent googletest
# versions have fixed this, but they have also removed the autotools build
# system support that we rely on. This is a temporary workaround to keep the
# googletest build working when the default python binary is Python 3.
mkdir tmp || true
pushd tmp
ln -s /usr/bin/python2 ./python
popd
PATH=$PWD/tmp:$PATH
# Initialize any submodules.
git submodule update --init --recursive
./autogen.sh

Loading…
Cancel
Save