Skip to content

Commit

Permalink
Merge pull request #9021 from acozzette/cherry-pick-fixes
Browse files Browse the repository at this point in the history
Cherry-pick fixes for 3.18.1
  • Loading branch information
acozzette authored Sep 30, 2021
2 parents bf8d7f0 + 5378c9a commit bfc4c34
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions kokoro/linux/dockerfile/test/java_stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y \
maven \
openjdk-8-jdk \
# Python dependencies
python-setuptools \
python-pip \
python3-setuptools \
python3-pip \
virtualenv \
&& apt-get clean
2 changes: 1 addition & 1 deletion kokoro/macos/prepare_build_macos_rc
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ if [[ "${KOKORO_INSTALL_RVM:-}" == "yes" ]] ; then
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -

curl -sSL https://get.rvm.io | bash -s master --ruby
curl -sSL https://get.rvm.io | bash -s stable --ruby
fi
1 change: 1 addition & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,5 @@ def get_option_from_sys_argv(option_str):
},
install_requires=install_requires,
ext_modules=ext_module_list,
python_requires='>=3.5',
)
17 changes: 2 additions & 15 deletions ruby/travis-test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

# Exit on any error.
set -e
set -ex

test_version() {
version=$1
Expand All @@ -18,7 +18,7 @@ test_version() {
rake gc_test &&
cd ../conformance && make test_jruby &&
cd ../ruby/compatibility_tests/v3.0.0 && ./test.sh"
elif [ "$version" == "ruby-2.6.0" -o "$version" == "ruby-2.7.0" -o "$version" == "ruby-3.0.2" ] ; then
else
bash --login -c \
"rvm install $version && rvm use $version && \
which ruby && \
Expand All @@ -29,19 +29,6 @@ test_version() {
cd ../conformance && make ${RUBY_CONFORMANCE} &&
cd ../ruby/compatibility_tests/v3.0.0 &&
cp -R ../../lib lib && ./test.sh"
else
# Recent versions of OSX have deprecated OpenSSL, so we have to explicitly
# provide a path to the OpenSSL directory installed via Homebrew.
bash --login -c \
"rvm install $version --with-openssl-dir=`brew --prefix openssl` && \
rvm use $version && \
which ruby && \
git clean -f && \
gem install bundler -v 1.17.3 && bundle && \
rake test &&
rake gc_test &&
cd ../conformance && make ${RUBY_CONFORMANCE} &&
cd ../ruby/compatibility_tests/v3.0.0 && ./test.sh"
fi
}

Expand Down
16 changes: 14 additions & 2 deletions tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -112,8 +124,8 @@ build_dist_install() {
virtualenv --no-site-packages venv
source venv/bin/activate
pushd python
python setup.py clean build sdist
pip install dist/protobuf-*.tar.gz
python3 setup.py clean build sdist
pip3 install dist/protobuf-*.tar.gz
popd
deactivate
rm -rf python/venv
Expand Down

0 comments on commit bfc4c34

Please sign in to comment.