Skip to content

Commit 71041fd

Browse files
authored
protobuf should use PYEXE not pip (#5231)
### Description We should be using `PY_EXE` in runtests as opposed to raw `pip`. ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Non-breaking change (fix or new feature that would not break existing functionality). Signed-off-by: Richard Brown <33289025+rijobro@users.noreply.github.com>
1 parent 52df2ba commit 71041fd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

runtests.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@
1414
# script for running all tests
1515
set -e
1616

17-
# FIXME: https://github.com/Project-MONAI/MONAI/issues/4354
18-
protobuf_major_version=$(pip list | grep '^protobuf ' | tr -s ' ' | cut -d' ' -f2 | cut -d'.' -f1)
19-
if [ "$protobuf_major_version" -ge "4" ]
20-
then
21-
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
22-
fi
23-
2417
# output formatting
2518
separator=""
2619
blue=""
@@ -118,6 +111,13 @@ function print_usage {
118111
exit 1
119112
}
120113

114+
# FIXME: https://github.com/Project-MONAI/MONAI/issues/4354
115+
protobuf_major_version=$(${PY_EXE} -m pip list | grep '^protobuf ' | tr -s ' ' | cut -d' ' -f2 | cut -d'.' -f1)
116+
if [ "$protobuf_major_version" -ge "4" ]
117+
then
118+
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
119+
fi
120+
121121
function check_import {
122122
echo "Python: ${PY_EXE}"
123123
${cmdPrefix}${PY_EXE} -W error -W ignore::DeprecationWarning -c "import monai"

0 commit comments

Comments
 (0)