I added some log codes in grpc/third_party/protobuf/src/google/protobuf code, to help locate the problem, i install grpc python from source, but The change did not take effect. Please give me some advice, thanks.
Supported Python Versions
Python 3.7.9
What operating system (Linux, Windows,...) and version?
Ubuntu 18.04.5 LTS
What did you do?
I added some log codes in grpc/third_party/protobuf/src/google/protobuf codeļ¼ then i compiled protobuf , compiled grpc and install grpc python from source
mkdir -p "third_party/protobuf/cmake/build"
cd "third_party/protobuf/cmake/build"
cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ..
make -j14 install
popd
make -j14
i modified setup.py, add this code:
CORE_C_FILES = filter(lambda x: 'third_party/protobuf' not in x, CORE_C_FILES)
PROTOBUF_INCLUDE = (os.path.join('/usr', 'include', 'protobuf'),)
EXTENSION_INCLUDE_DIRECTORIES = ((PYTHON_STEM,) + CORE_INCLUDE + ABSL_INCLUDE +
ADDRESS_SORTING_INCLUDE + CARES_INCLUDE +
RE2_INCLUDE + PROTOBUF_INCLUDE + SSL_INCLUDE + UPB_INCLUDE +
UPB_GRPC_GENERATED_INCLUDE +
UPBDEFS_GRPC_GENERATED_INCLUDE +
XXHASH_INCLUDE + ZLIB_INCLUDE)
then i run:
pip install -rrequirements.txt
GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install .
I'm confused, why aren't the changes to Protobuf working? Maybe there is something wrong with my installation method, please give me some suggestions,thanks.