• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# Copyright 2020 The gRPC Authors
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16echo "It's recommended that you run this script from a virtual environment."
17
18set -e
19
20BASEDIR=$(dirname "$0")
21BASEDIR=$(realpath "$BASEDIR")/../..
22
23(cd "$BASEDIR";
24  pip install --upgrade cython;
25  python setup.py install;
26  pushd tools/distrib/python/grpcio_tools;
27    ../make_grpcio_tools.py
28    GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install .
29  popd;
30  pushd src/python;
31    for PACKAGE in ./grpcio_*; do
32      pushd "${PACKAGE}";
33        python setup.py preprocess;
34        python setup.py install;
35      popd;
36    done
37  popd;
38)
39