MCPcopy Create free account
hub / github.com/Tencent/phxsql / CheckProtobufVersion

Function CheckProtobufVersion

tools/check_install.py:73–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71 exit(1)
72
73def CheckProtobufVersion():
74 protobuf_bin_path = base_dir + "/third_party/protobuf/bin"
75 if( not os.path.exists( protobuf_bin_path ) ):
76 print "please make sure protobuf 3.0+ has been installed on the third party directory"
77 print "and %s/protoc can be detected" % protobuf_bin_path
78 exit(1)
79
80 cmd = "%s/protoc --version | grep libprotoc.3" % protobuf_bin_path
81 cmd_res = os.popen( cmd, 'r' )
82 res=cmd_res.read()
83 cmd_res.close()
84 if( res == '' ):
85 print "protobuf %s has beed found",res
86 print "please make sure protobuf 3.0+ has been installed on the third party directory"
87 exit(1)
88
89if(__name__ == '__main__'):
90 base_dir=sys.argv[1]

Callers 1

check_install.pyFile · 0.85

Calls 1

closeMethod · 0.80

Tested by

no test coverage detected