aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/build_python.sh
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-11-01 14:27:25 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-11-01 14:27:25 -0700
commitac119ba887e37c8b4c7fc0e6f43477869796db06 (patch)
tree51afcc18b19a1688b6cbd40984740bbd0d8200c2 /tools/run_tests/build_python.sh
parent5282cdb025d222c5bdf6069ae06ea8b568c4baf6 (diff)
parent9dd2c7da2f82eb27dfbef01a9c133e403dcffc45 (diff)
Merge github.com:grpc/grpc into microbench
Diffstat (limited to 'tools/run_tests/build_python.sh')
-rwxr-xr-xtools/run_tests/build_python.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh
index b786c479f3..fb884ad166 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
@@ -166,9 +180,18 @@ pip_install_dir $ROOT/tools/distrib/python/grpcio_tools
# TODO(atash) figure out namespace packages and grpcio-tools and auditwheel
# etc...
pip_install_dir $ROOT
+
+# Build/install health checking
$VENV_PYTHON $ROOT/src/python/grpcio_health_checking/setup.py preprocess
$VENV_PYTHON $ROOT/src/python/grpcio_health_checking/setup.py build_package_protos
pip_install_dir $ROOT/src/python/grpcio_health_checking
+
+# Build/install reflection
+$VENV_PYTHON $ROOT/src/python/grpcio_reflection/setup.py preprocess
+$VENV_PYTHON $ROOT/src/python/grpcio_reflection/setup.py build_package_protos
+pip_install_dir $ROOT/src/python/grpcio_reflection
+
+# Build/install tests
$VENV_PYTHON $ROOT/src/python/grpcio_tests/setup.py preprocess
$VENV_PYTHON $ROOT/src/python/grpcio_tests/setup.py build_package_protos
pip_install_dir $ROOT/src/python/grpcio_tests