17 import make_grpcio_tools
as _make
19 OUT_OF_DATE_MESSAGE =
"""file {} is out of date
21 Have you called tools/distrib/python/make_grpcio_tools.py since upgrading protobuf?"""
23 submodule_commit_hash = _make.protobuf_submodule_commit_hash()
25 with open(_make.GRPC_PYTHON_PROTOC_LIB_DEPS,
'r')
as _protoc_lib_deps_file:
26 content = _protoc_lib_deps_file.read().splitlines()
28 testString = (_make.COMMIT_HASH_PREFIX + submodule_commit_hash +
29 _make.COMMIT_HASH_SUFFIX)
31 if testString
not in content:
32 print(OUT_OF_DATE_MESSAGE.format(_make.GRPC_PYTHON_PROTOC_LIB_DEPS))