Note: The compilation of the C files (make
) requires GCC version 7. Maybe LLVM?
- Git clone & init the project
git clone ...
git submodule update --init
- Create & setup a virtual environment
python3.7 -m venv py37_native
source py37_native/bin/activate
pip install -r requirements.txt
pip install six==1.12.0 cython
- Compile
make # Compiles the C files (required the first time)
python tools/run_tests/run_tests.py -l python --compiler python3.7 --build_only # this is required on every change of cython files
3.1 Optionally, reset the sub-modules
git submodule foreach --recursive git clean -xfd
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
make clean
make build
- Run the tests
GRPC_ENABLE_FORK_SUPPORT=0 python ./src/python/grpcio_tests/setup.py test_aio
Running tests with Bazel
./tools/bazel test //src/python/grpcio_tests/tests_aio/...
- Linting & sanity checks
bash ./tools/distrib/yapf_code.sh
bash ./tools/distrib/pylint_code.sh
bash ./tools/distrib/check_pytype.sh
bash ./tools/distrib/buildifier_format_code.sh