install_all_python_modules.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. echo "It's recommended that you run this script from a virtual environment."
  16. set -e
  17. BASEDIR=$(dirname "$0")
  18. BASEDIR=$(realpath "$BASEDIR")/../..
  19. (cd "$BASEDIR";
  20. pip install --upgrade cython;
  21. python setup.py install;
  22. pushd tools/distrib/python/grpcio_tools;
  23. ../make_grpcio_tools.py
  24. GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install .
  25. popd;
  26. pushd src/python;
  27. for PACKAGE in ./grpcio_*; do
  28. pushd "${PACKAGE}";
  29. python setup.py preprocess;
  30. python setup.py install;
  31. popd;
  32. done
  33. popd;
  34. )