Debian Codegraph @

tools/distrib/docgen/_generate_python_doc.sh

raw
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 #
16 # This script is meant to be ran in Docker instance of python:3.8.
17
18 set -ex
19
20 # Some Python package installation requires permission to change homedir. But
21 # due to the user-override in all_lang_docgen.sh, the user in the container
22 # doesn't have a home dir which leads to permission denied error.
23 HOME="$(mktemp -d)"
24 export HOME
25
26 pip install -r requirements.bazel.txt
27 tools/run_tests/run_tests.py -c opt -l python --compiler python3.8 --newline_on_success -j 8 --build_only
28 # shellcheck disable=SC1091
29 source py38/bin/activate
30 pip install --upgrade Sphinx
31 python setup.py doc