From bc77f197a7d79c8cc35e6ccd689e0962439aacd7 Mon Sep 17 00:00:00 2001 From: Richard Brown <33289025+rijobro@users.noreply.github.com> Date: Thu, 29 Sep 2022 17:26:31 +0100 Subject: [PATCH] protobuf should use PYEXE not pip Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com> --- runtests.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/runtests.sh b/runtests.sh index db6022e9b1..490b50b136 100755 --- a/runtests.sh +++ b/runtests.sh @@ -14,13 +14,6 @@ # script for running all tests set -e -# FIXME: https://github.com/Project-MONAI/MONAI/issues/4354 -protobuf_major_version=$(pip list | grep '^protobuf ' | tr -s ' ' | cut -d' ' -f2 | cut -d'.' -f1) -if [ "$protobuf_major_version" -ge "4" ] -then - export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python -fi - # output formatting separator="" blue="" @@ -118,6 +111,13 @@ function print_usage { exit 1 } +# FIXME: https://github.com/Project-MONAI/MONAI/issues/4354 +protobuf_major_version=$(${PY_EXE} -m pip list | grep '^protobuf ' | tr -s ' ' | cut -d' ' -f2 | cut -d'.' -f1) +if [ "$protobuf_major_version" -ge "4" ] +then + export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python +fi + function check_import { echo "Python: ${PY_EXE}" ${cmdPrefix}${PY_EXE} -W error -W ignore::DeprecationWarning -c "import monai"