MCPcopy Create free account
hub / github.com/apple/coremltools / GetVersion

Function GetVersion

deps/protobuf/python/setup.py:39–48  ·  view source on GitHub ↗

Gets the version from google/protobuf/__init__.py Do not import google.protobuf.__init__ directly, because an installed protobuf library may be loaded instead.

()

Source from the content-addressed store, hash-verified

37
38
39def GetVersion():
40 """Gets the version from google/protobuf/__init__.py
41
42 Do not import google.protobuf.__init__ directly, because an installed
43 protobuf library may be loaded instead."""
44
45 with open(os.path.join('google', 'protobuf', '__init__.py')) as version_file:
46 exec(version_file.read(), globals())
47 global __version__
48 return __version__
49
50
51def generate_proto(source, require = True):

Callers 1

setup.pyFile · 0.85

Calls 5

openFunction · 0.85
globalsFunction · 0.85
execFunction · 0.50
joinMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected