diff options
author | Masood Malekghassemi <atash@google.com> | 2016-10-27 16:57:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-27 16:57:17 -0700 |
commit | c293f7215fa77e2d1132a7bcc0e0610c8d054044 (patch) | |
tree | 6683dd77b76517735ce95665348e3fc8a671c13c /tools | |
parent | 899f771ce334b99d1b3f40c2f38dfe563d4d29ac (diff) | |
parent | cad0908a2b5064d637036e892ca51ed2c2db57c6 (diff) |
Merge pull request #8524 from soltanmm-google/grit-in-the-eye
Break out of build process if in vanilla MSYS
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/run_tests/build_python.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index b786c479f3..54e2fe5347 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -39,6 +39,14 @@ cd $(dirname $0)/../.. PLATFORM=`uname -s` +function is_msys() { + if [ "${PLATFORM/MSYS}" != "$PLATFORM" ]; then + echo true + else + exit 1 + fi +} + function is_mingw() { if [ "${PLATFORM/MINGW}" != "$PLATFORM" ]; then echo true @@ -108,6 +116,12 @@ VENV=${2:-$(venv $PYTHON)} VENV_RELATIVE_PYTHON=${3:-$(venv_relative_python)} TOOLCHAIN=${4:-$(toolchain)} +if [ $(is_msys) ]; then + echo "MSYS doesn't directly provide the right compiler(s);" + echo "switch to a MinGW shell." + exit 1 +fi + ROOT=`pwd` export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv $CFLAGS" export GRPC_PYTHON_BUILD_WITH_CYTHON=1 |